Disable `greenback` sync fn breakpointing by def
Opting for performance over broad multi-actor "debug-ability" from sync-function-contexts when `debug_mode=True` is set; IOW prefer no behind-the-scenes `greenlet` perf impact over being able to use an actor-safe `breakpoint()` wherever as per, https://greenback.readthedocs.io/en/latest/principle.html#performance Adjust the breakpoint restore ex script to match.
parent
37377e8220
commit
304117b4e1
|
@ -19,8 +19,11 @@ async def main() -> None:
|
||||||
async with tractor.open_nursery(
|
async with tractor.open_nursery(
|
||||||
debug_mode=True,
|
debug_mode=True,
|
||||||
loglevel='devx',
|
loglevel='devx',
|
||||||
) as an:
|
maybe_enable_greenback=True,
|
||||||
assert an
|
# ^XXX REQUIRED to enable `breakpoint()` support (from sync
|
||||||
|
# fns) and thus required here to avoid an assertion err
|
||||||
|
# on the next line
|
||||||
|
):
|
||||||
assert (
|
assert (
|
||||||
(pybp_var := os.environ['PYTHONBREAKPOINT'])
|
(pybp_var := os.environ['PYTHONBREAKPOINT'])
|
||||||
==
|
==
|
||||||
|
|
|
@ -166,7 +166,9 @@ async def open_root_actor(
|
||||||
|
|
||||||
# enables the multi-process debugger support
|
# enables the multi-process debugger support
|
||||||
debug_mode: bool = False,
|
debug_mode: bool = False,
|
||||||
maybe_enable_greenback: bool = True, # `.pause_from_sync()/breakpoint()` support
|
maybe_enable_greenback: bool = False, # `.pause_from_sync()/breakpoint()` support
|
||||||
|
# ^XXX NOTE^ the perf implications of use,
|
||||||
|
# https://greenback.readthedocs.io/en/latest/principle.html#performance
|
||||||
enable_stack_on_sig: bool = False,
|
enable_stack_on_sig: bool = False,
|
||||||
|
|
||||||
# internal logging
|
# internal logging
|
||||||
|
|
Loading…
Reference in New Issue