]> git.lizzy.rs Git - rust.git/commit
thread::unpark: Avoid notifying with mutex locked.
authorJames Duley <james.duley@arm.com>
Fri, 21 Sep 2018 14:13:39 +0000 (14:13 +0000)
committerJames Duley <james.duley@arm.com>
Tue, 30 Oct 2018 22:54:35 +0000 (22:54 +0000)
commitd3e71e4986c3970d2f51b972c1dfdd740f89385a
tree015f2820023fbd47b658eb30850f42ca63c5cecb
parente8aef7cae14bc7a56859408c90253e9bcc07fcff
thread::unpark: Avoid notifying with mutex locked.

This means when the other thread wakes it can continue right away
instead of having to wait for the mutex.

Also add some comments explaining why the mutex needs to be locked in
the first place.
src/libstd/thread/mod.rs