New module: sync
Opened this issue · 0 comments
achimnol commented
Add a new module called "sync" which provides a set of high-level synchronization primitives not offered in the standard library.
My first idea is AsyncBarrier: when all coroutines that share the same barrier object calls wait()
, then they are all blocked until all of them calls wait()
. If all has called wait()
, resume their execution. Preferably, the API should look like threading.Barrier
.
Let's also write test suites for it.
Ideas for other synchronization primitives are welcome.