Expand description
Scope stack storage and propagation helpers.
The runtime tracks the current scope hierarchy through a shared
ScopeStack stored in task-local or thread-local state. Advanced callers
can use this module to inspect the active scope chain, attach scope-local
middleware, or propagate scope context into worker threads.
Structs§
- Scope
Stack - Mutable stack of active scopes plus their scope-local registries.
- Thread
Scope Stack Binding - Captured thread-local scope stack binding.
Statics§
- TASK_
SCOPE_ STACK - Task-local scope stack handle used by async execution contexts.
Functions§
- capture_
thread_ scope_ stack - Capture the current thread-local scope stack binding.
- create_
scope_ stack - Create a new scope stack handle with an implicit root scope.
- current_
scope_ stack - Return the scope stack visible to the current execution context.
- propagate_
scope_ to_ thread - Capture the current scope stack handle for use in another thread.
- restore_
thread_ scope_ stack - Restore a previously captured thread-local scope stack binding.
- scope_
stack_ active - Report whether the current context has an explicitly active scope stack.
- set_
thread_ scope_ stack - Install an explicit scope stack for the current thread.
- sync_
thread_ scope_ stack - Synchronize the thread-local scope stack without marking it explicit.
- task_
scope_ push - Push a scope handle onto the active stack.
- task_
scope_ remove - Remove a scope handle from the active stack.
- task_
scope_ top - Clone the current top-most scope handle from the active stack.
Type Aliases§
- Scope
Stack Handle - Shared handle type for the runtime scope stack.