TaskScope parent is thrown into only if scope has terminated
This commit is contained in:
parent
b8cdeef41c
commit
bfd494a2d7
|
@ -477,7 +477,7 @@ class DefaultKernel(BaseKernel):
|
|||
self._reschedule_scope_tree(scope)
|
||||
self.release(task)
|
||||
self.cancel_scope(scope)
|
||||
if task is not scope.owner:
|
||||
if task is not scope.owner and scope.done():
|
||||
self.throw(scope.owner, task.exc)
|
||||
|
||||
def on_cancel(self, task: Task):
|
||||
|
|
Loading…
Reference in New Issue