forked from goodboy/tractor
Don't double request a cancelled actor
parent
8e21bb046e
commit
c01d2f8aea
|
@ -198,6 +198,7 @@ class ActorNursery:
|
||||||
# one-cancels-all strat
|
# one-cancels-all strat
|
||||||
async with trio.open_nursery() as cancel_sender:
|
async with trio.open_nursery() as cancel_sender:
|
||||||
for subactor, proc, portal in childs.values():
|
for subactor, proc, portal in childs.values():
|
||||||
|
if proc.poll() is None and not portal.cancel_called:
|
||||||
cancel_sender.start_soon(portal.cancel_actor)
|
cancel_sender.start_soon(portal.cancel_actor)
|
||||||
|
|
||||||
# cancel all spawner tasks
|
# cancel all spawner tasks
|
||||||
|
@ -298,7 +299,6 @@ async def _open_and_supervise_one_cancels_all_nursery(
|
||||||
# same as a user code failure.
|
# same as a user code failure.
|
||||||
|
|
||||||
except BaseException as err:
|
except BaseException as err:
|
||||||
print('ERROR')
|
|
||||||
# anursery._join_procs.set()
|
# anursery._join_procs.set()
|
||||||
src_err = err
|
src_err = err
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue