mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
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
Block a user