forked from M-Labs/artiq
tools/TaskObject: do not suppress exceptions raised by terminating task
This commit is contained in:
parent
705ec6ba04
commit
e078dabd3c
|
@ -128,7 +128,10 @@ class TaskObject:
|
|||
@asyncio.coroutine
|
||||
def stop(self):
|
||||
self.task.cancel()
|
||||
yield from asyncio.wait([self.task])
|
||||
try:
|
||||
yield from asyncio.wait_for(self.task, None)
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
del self.task
|
||||
|
||||
@asyncio.coroutine
|
||||
|
|
Loading…
Reference in New Issue