Merge pull request #396 from pikers/tractor_core_port

Tractor core port
pin_tractor_main
goodboy 2022-09-16 18:09:33 -04:00 committed by GitHub
commit 5d371ad80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -528,9 +528,9 @@ def open_shm_array(
# "unlink" created shm on process teardown by
# pushing teardown calls onto actor context stack
# TODO: make this a public API in ``tractor``..
tractor._actor._lifetime_stack.callback(shmarr.close)
tractor._actor._lifetime_stack.callback(shmarr.destroy)
stack = tractor.current_actor().lifetime_stack
stack.callback(shmarr.close)
stack.callback(shmarr.destroy)
return shmarr
@ -614,8 +614,8 @@ def attach_shm_array(
if key not in _known_tokens:
_known_tokens[key] = token
# "close" attached shm on process teardown
tractor._actor._lifetime_stack.callback(sha.close)
# "close" attached shm on actor teardown
tractor.current_actor().lifetime_stack.callback(sha.close)
return sha