-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
Facts
- Current work is bound to Standard Library's
asyncio. - It depends on
asyncio.sleepand on theasyncio.CancelledErrorexception. - WRT
asyncio, thesyncermodule transformsasyncio.sleeptotime.sleep.
Idea
- Supporting other libraries and frameworks would be nice: curio, trio, and Twisted come to mind.
- Maybe having a decoupling module that would map
sleepand task cancellation to the various candidates above could work. Such mapping could be done automatically by trying to import them (and prioritising if more than one is found), falling back toasyncio. Manual selection should be possible. - The
syncermodule would need minor and trivial changes, it seems. - Sleeping is nearly trivial, even in Twisted, that would require a minimal
sleepimplementation to be provided. - Need to confirm task cancellation model under different targets: do they all throw exceptions into the underlying coroutine?