Compare commits

...

6 Commits

Author SHA1 Message Date
Tyler Goodlet eeb0516017 Merge branch 'gitea/main' into 'github/main'
Synchronizing the "main", previously (and less woke-ly/succinctly)
called "master", branch between our `gitea` remote and the current
`github` tip.

* main:
  Only set shield flag when trio nursery mode is used
  Disable parent channel append on get_peer_by_name to_scan
2025-06-19 19:51:03 -04:00
goodboy d6eeddef4e
Merge pull request #338 from goodboy/shm_apis
Shared memory array API and optional tight integration with `numpy`

Landing this so many downstream major feature branches depend on it namely,
- https://github.com/goodboy/tractor/pull/375
- https://github.com/goodboy/tractor/pull/376
- and the eventual #10
2025-04-25 23:20:46 -04:00
guille d478dbfcfe Merge pull request 'Fix to trionics helper `maybe_open_nursery`' (#26) from maybe_open_nursery_fix into main
Reviewed-on: #26
2025-04-13 20:58:47 +00:00
Guillermo Rodriguez ef6094a650
Only set shield flag when trio nursery mode is used 2025-04-13 17:57:37 -03:00
guille 4e8404bb09 Merge pull request 'Duplicated channel on `Actor._peers` causes hang on `portal.cancel_actor()`' (#25) from discovery_dedup into main
Reviewed-on: #25
2025-04-13 20:53:23 +00:00
Guillermo Rodriguez bbb3484ae9
Disable parent channel append on get_peer_by_name to_scan 2025-04-13 14:06:03 -03:00
2 changed files with 11 additions and 4 deletions

View File

@ -114,9 +114,15 @@ def get_peer_by_name(
'''
actor: Actor = current_actor()
to_scan: dict[tuple, list[Channel]] = actor._peers.copy()
pchan: Channel|None = actor._parent_chan
if pchan:
to_scan[pchan.uid].append(pchan)
# TODO: is this ever needed? creates a duplicate channel on actor._peers
# 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():
_, peer_name = aid

View File

@ -70,7 +70,8 @@ async def maybe_open_nursery(
yield nursery
else:
async with lib.open_nursery(**kwargs) as nursery:
nursery.cancel_scope.shield = shield
if lib == trio:
nursery.cancel_scope.shield = shield
yield nursery