For claude, ignore no runtime for offline shm reading
parent
8718ad4874
commit
f11ab5f0aa
|
|
@ -520,9 +520,12 @@ def open_shm_array(
|
||||||
|
|
||||||
# "unlink" created shm on process teardown by
|
# "unlink" created shm on process teardown by
|
||||||
# pushing teardown calls onto actor context stack
|
# pushing teardown calls onto actor context stack
|
||||||
stack = tractor.current_actor().lifetime_stack
|
stack = tractor.current_actor(
|
||||||
stack.callback(shmarr.close)
|
err_on_no_runtime=False,
|
||||||
stack.callback(shmarr.destroy)
|
).lifetime_stack
|
||||||
|
if stack:
|
||||||
|
stack.callback(shmarr.close)
|
||||||
|
stack.callback(shmarr.destroy)
|
||||||
|
|
||||||
return shmarr
|
return shmarr
|
||||||
|
|
||||||
|
|
@ -607,7 +610,10 @@ def attach_shm_array(
|
||||||
_known_tokens[key] = token
|
_known_tokens[key] = token
|
||||||
|
|
||||||
# "close" attached shm on actor teardown
|
# "close" attached shm on actor teardown
|
||||||
tractor.current_actor().lifetime_stack.callback(sha.close)
|
if (actor := tractor.current_actor(
|
||||||
|
err_on_no_runtime=False,
|
||||||
|
)):
|
||||||
|
actor.lifetime_stack.callback(sha.close)
|
||||||
|
|
||||||
return sha
|
return sha
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue