New submission from Oleg K <windspi...@gmail.com>:

currently there is no other way to interrupt task but to call
cancel() which will: 

"This arranges for a CancelledError to be thrown into the wrapped coroutine on 
the next cycle through the event loop."

in order to write advanced Tasks there should be a way
to throw custom exceptions into active Task. 
so it can react accordingly.  

i am looking for the same thing as "generator.throw()" is providing,
allowing to interrupt generators different way.

----------
components: asyncio
messages: 306644
nosy: Oleg K2, yselivanov
priority: normal
severity: normal
status: open
title: add method throw() to asyncio.Task
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32104>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to