az...@icloud.com
unread,Nov 19, 2017, 3:26:03 AM11/19/17Sign in to reply to author
Sign in to forward
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-tulip
Is there some programming pattern that would enable me to detect when an asyncio event loop becomes idle in the following sense? Say that my execution path branches in some complex way, say, using asyncio.gather(), but I know that each branch eventually awaits some idle coroutine, such as a socket or a subprocess. Say I know these coroutines actually never yield, so the event loop will execute whatever python code it can but eventually will just wait for those idle coroutines. Is there a programmatic way to detect such a state and stop the loop?