From 28819bf5d3b9d6dff7655d7b5210131a012cbc1c Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 19 Feb 2026 13:38:47 -0500 Subject: [PATCH] Add `Actor.is_root()` convenience predicate meth --- tractor/_runtime.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tractor/_runtime.py b/tractor/_runtime.py index c6ff9e4c..f77c69c1 100644 --- a/tractor/_runtime.py +++ b/tractor/_runtime.py @@ -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()`,