[Async-sig] ANN: miniasync, a small library build on top of asyncio for simple use cases
Alice Heaton
alicemail at loveisanalogue.info
Fri May 4 04:57:02 EDT 2018
On 04/05/18 09:18, Dima Tisnek wrote:
> Nice!
Thanks :)
> At first, I thought that implementation would be trivial, but upon
> inspection it's actually educational!
There a number of small gotchas which are obvious once you think about
them, and are not complicated per se, but can trip people when they
first start using asyncio (they tripped me anyway :)).
For example: once you've cancelled a Future (by calling ".cancel()" on
it) you actually need to run the loop again to give the code a chance to
actually do it's clean up tasks. It makes sense once you understand how
asyncio works, but it's not obvious at first.
miniasync aims to shield people from these things for the simple use case.
:)
Alice
More information about the Async-sig
mailing list