Add `Actor.is_root()` convenience predicate meth

tpt_tolerance
Gud Boi 2026-02-19 13:38:47 -05:00
parent 07c2ba5c0d
commit 28819bf5d3
1 changed files with 8 additions and 0 deletions

View File

@ -183,6 +183,14 @@ class Actor:
def is_registrar(self) -> bool:
return self.is_arbiter
@property
def is_root(self) -> bool:
'''
This actor is the parent most in the tree?
'''
return _state.is_root_process()
msg_buffer_size: int = 2**6
# nursery placeholders filled in by `async_main()`,