Open diefans opened 7 years ago
This api is broken. There is no way to override it in asyncio. You can use loop.current_task()
There are plans to change add current_task()
to asyncio
@1st1 btw do we have plans to add current_task()
to event loop?
Yes, we do, after I finish on my current PEP, I'll switch to working on a PEP for asyncio improvements in 3.7. loop.current_task()
will be a part of it.
If I register a signal handler within a task to cancel itself, tokio failes with:
AttributeError: 'NoneType' object has no attribute 'cancel'