You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 callswait()
. If all has calledwait()
, resume their execution. Preferably, the API should look likethreading.Barrier
.Let's also write test suites for it.
Ideas for other synchronization primitives are welcome.
The text was updated successfully, but these errors were encountered: