Skip to main content

nemo_flow_scope_stack_set_thread

Function nemo_flow_scope_stack_set_thread 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn nemo_flow_scope_stack_set_thread( stack: *const FfiScopeStack, ) -> NemoFlowStatus
Expand description

Bind an isolated scope stack to the current OS thread.

After this call, all NeMo Flow scope operations on the current thread (e.g. nemo_flow_push_scope, nemo_flow_get_handle) will use the given scope stack. This is typically used from Go goroutines that have called runtime.LockOSThread().

The FfiScopeStack is not consumed — the caller retains ownership and must still free it when done.

§Parameters

  • stack: Scope stack to bind to the current OS thread.

§Returns

§Safety

stack must be a valid, non-null FfiScopeStack pointer.