{ } Raw JSON

bundles / traitlets latest / traitlets / config / configurable / _threads_inherit_context

function

traitlets.config.configurable:_threads_inherit_context

source: /traitlets/config/configurable.py:537

Signature

def _threads_inherit_context() → bool

Summary

Whether a new threading.Thread inherits the caller's context.

Extended Summary

Governed by sys.flags.thread_inherit_context: false by default on the GIL build, true by default on the free-threaded build (e.g. 3.14t) and on any build launched with -X thread_inherit_context=1. When true, an active SingletonScope propagates into threads started while it is active.

Aliases

  • traitlets.config.configurable._threads_inherit_context