[issue32181] runaway Tasks with Task.cancel() ignored.

2017-11-30 Thread Oleg K
New submission from Oleg K : (tested in VM and in real linux) there is an issue with Task, in some cases task will ignore cancellation and will keep running for a while. there is some explanation needed regarding the python_task_cancel.py example. 1)there is a async Integer Generator

[issue32104] add method throw() to asyncio.Task

2017-11-30 Thread Oleg K
Oleg K added the comment: What is an "advanced" task? Why CancelledError is not enough? What's the actual use case? -- for instance, i want to create a task which is responsible for controlling a "slow resource" that should accessed carefu

[issue32104] add method throw() to asyncio.Task

2017-11-21 Thread Oleg K
New submission from Oleg K : 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 b