asymcio.TimerHandle.done()
24 Oct
2018
24 Oct
'18
6:38 a.m.
I'm rewriting an existing python program using a 3rd party async library to standard asyncio. That library allows one to check if a timer created with: timer = loop.call_later(delay, callback) is active, i.e. not cancelled and the scheduled callback not executed yet. I'm missing that functionality in asyncio and would like to propose: TimerHandle.done() = True if cancelled or no longer waiting in the event loop's queue; otherwise False In that program sometimes a state is defined just by the mere existence of an active timer - no state variables, no real callbacks. I find that quite a natural mini-pattern.
2242
Age (days ago)
2242
Last active (days ago)
0 comments
1 participants
participants (1)
-
reg.python@poti.sk