Skip to main content

propagate_scope_to_thread

Function propagate_scope_to_thread 

Source
pub fn propagate_scope_to_thread() -> Result<ScopeStackHandle>
Expand description

Capture the current scope stack handle for use in another thread.

This returns the handle currently visible to the caller so it can be passed into set_thread_scope_stack elsewhere.

§Returns

A Result containing the active ScopeStackHandle.

§Errors

Returns an error when the current context does not yet own an active scope stack.

§Notes

The returned handle is shared; it does not clone the underlying stack.