-
-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trio.Barrier synchronization promitive #1434
Comments
I dunno, maybe! I know it's something that shows up in various concurrency libraries, but I've never run into a case where I needed it myself, so I'm pretty fuzzy on what makes it useful. Which is annoying, because it makes it hard to know whether we've got the API right. How will it help your |
After lots of debugging and testing, I wound up not needing the barrier after all. The synchronization provided by You can view my barrier implementation here: https://pastebin.com/ay3uucfS |
Closing this for now, as I don't think we should add new primitives without someone making a strong case for them 🙂 |
Trying to fix an edge case in my implementation of a
TeeingReceiveStream
, I discovered that I likely need a task synchronization primitive called a “barrier” (Python threading docs) to synchronize value read access between different tasks.Would this be considered a good fit for inclusion into
trio
? It not being present right now, I'll have to write my own, so what I'm really asking is: Should I bother polishing it up and hand it in for review or not?– A big trio fan 🙂
The text was updated successfully, but these errors were encountered: