Compare commits
4 Commits
pytest_plu
...
main
Author | SHA1 | Date |
---|---|---|
|
d478dbfcfe | |
|
ef6094a650 | |
|
4e8404bb09 | |
|
bbb3484ae9 |
|
@ -114,9 +114,15 @@ def get_peer_by_name(
|
||||||
'''
|
'''
|
||||||
actor: Actor = current_actor()
|
actor: Actor = current_actor()
|
||||||
to_scan: dict[tuple, list[Channel]] = actor._peers.copy()
|
to_scan: dict[tuple, list[Channel]] = actor._peers.copy()
|
||||||
pchan: Channel|None = actor._parent_chan
|
|
||||||
if pchan:
|
# TODO: is this ever needed? creates a duplicate channel on actor._peers
|
||||||
to_scan[pchan.uid].append(pchan)
|
# when multiple find_actor calls are made to same actor from a single ctx
|
||||||
|
# which causes actor exit to hang waiting forever on
|
||||||
|
# `actor._no_more_peers.wait()` in `_runtime.async_main`
|
||||||
|
|
||||||
|
# pchan: Channel|None = actor._parent_chan
|
||||||
|
# if pchan and pchan.uid not in to_scan:
|
||||||
|
# to_scan[pchan.uid].append(pchan)
|
||||||
|
|
||||||
for aid, chans in to_scan.items():
|
for aid, chans in to_scan.items():
|
||||||
_, peer_name = aid
|
_, peer_name = aid
|
||||||
|
|
|
@ -70,7 +70,8 @@ async def maybe_open_nursery(
|
||||||
yield nursery
|
yield nursery
|
||||||
else:
|
else:
|
||||||
async with lib.open_nursery(**kwargs) as nursery:
|
async with lib.open_nursery(**kwargs) as nursery:
|
||||||
nursery.cancel_scope.shield = shield
|
if lib == trio:
|
||||||
|
nursery.cancel_scope.shield = shield
|
||||||
yield nursery
|
yield nursery
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue