about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-10-25 08:35:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-10-25 08:35:51 -0700
commit6511e4675345887bd8f60bfd8296a1451a08f73c (patch)
tree35a52e833d3b227c38f3676f11a689f0feefdd83 /src/libstd/sys/unix/stack_overflow.rs
parentb2478052f88db8c8526ee2dc4a382da91eefc76c (diff)
downloadrust-6511e4675345887bd8f60bfd8296a1451a08f73c.tar.gz
rust-6511e4675345887bd8f60bfd8296a1451a08f73c.zip
std: Optimize thread park/unpark implementation
This is an adaptation of alexcrichton/futures-rs#597 for the standard library.
The goal here is to avoid locking a mutex on the "fast path" for thread
park/unpark where you're waking up a thread that isn't sleeping or otherwise
trying to park a thread that's already been notified. Mutex performance varies
quite a bit across platforms so this should provide a nice consistent speed
boost for the fast path of these functions.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions