This PR by @stjepang on async-std is really cool. It creates a new type `WakerSet` that acts as a building block for a lot of our synchronization primitives (Mutex, Channel, RwLock)
Even `sync::CondVar` can likely be just a thin wrapper around this type!https://github.com/async-rs/async-std/pull/390 …
-
Show this thread
It's really nice. It acts much like a `Mutex<HashMap>` but where the keys for new items are auto-generated. It supports {insert,update,remove} + lock + 2 APIs to notify wakers ("wake all" vs "wake one"). Also entirely lock-free, so really fast!
6:55 PM - 30 Oct 2019
from Berlin, Germany
0 replies
1 retweet
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.