synchronous Event set
See original GitHub issueI’d like to use anyio for compatibility across asyncio and Trio, but async Event.set()
(due to Curio) is a non-starter. Event is a widely use primitive. I’m guessing that an async set()
would double the number of functions needing to be async in my program, and hence greatly increase the race conditions I’d need to ponder. It’s advised in “The Function Colour Myth” to keep async function percentage to a minimum.
It’s not like I’m explicitly opting to not support Curio either, because my intended use case depends on Quart, which itself only supports asyncio and Trio.
It seems like there could just be a synchronous_set()
method in the ABC, and Curio could raise NotImplementedError. Isn’t there already precedent with FileStreamWrapper.send_eof()
?.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:64 (39 by maintainers)
Top GitHub Comments
Now that the decision was made to not implement this in the 2.x series, but rather in 3.0 in which curio is no more, I take it we don’t want the backwards dummy awaitable for backwards compatibility? The incompatible API changes will of course be documented in the changelog.
Yeah, this is the plan.