Add `enable_stack_on_sig: bool` for `stackscope` toggle
							parent
							
								
									46c8dbef1f
								
							
						
					
					
						commit
						863751b47b
					
				|  | @ -80,6 +80,7 @@ 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 = False,  # `.pause_from_sync()/breakpoint()` support |     maybe_enable_greenback: bool = False,  # `.pause_from_sync()/breakpoint()` support | ||||||
|  |     enable_stack_on_sig: bool = False, | ||||||
| 
 | 
 | ||||||
|     # internal logging |     # internal logging | ||||||
|     loglevel: str|None = None, |     loglevel: str|None = None, | ||||||
|  | @ -210,7 +211,11 @@ async def open_root_actor( | ||||||
|     assert _log |     assert _log | ||||||
| 
 | 
 | ||||||
|     # TODO: factor this into `.devx._stackscope`!! |     # TODO: factor this into `.devx._stackscope`!! | ||||||
|     if debug_mode: |     if ( | ||||||
|  |         debug_mode | ||||||
|  |         and | ||||||
|  |         enable_stack_on_sig | ||||||
|  |     ): | ||||||
|         try: |         try: | ||||||
|             logger.info('Enabling `stackscope` traces on SIGUSR1') |             logger.info('Enabling `stackscope` traces on SIGUSR1') | ||||||
|             from .devx import enable_stack_on_sig |             from .devx import enable_stack_on_sig | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue