Skip to main content

xila_thread_stop_others

Function xila_thread_stop_others 

Source
pub unsafe extern "C" fn xila_thread_stop_others(
    process: *const Process,
) -> Status
Expand description

Begin terminal process cleanup. Only the calling thread may run after this call, even if cleanup suspends. Spawning new workers is disabled.

The other threads are stopped at once: a cancellable wait one of them is suspended in (a path call holding the VFS namespace lock, a socket being connected) is dropped now, so cleanup never waits for what it held. Their stacks stay until the process ends.

A stopped thread that was waiting on a mutex or a condition variable stays in its queue. Terminal cleanup must therefore only try-lock (XILA_MUTEX_TRY): an unlock that finds a queued waiter hands the mutex to a thread that never runs again, and a blocking lock behind a stopped owner or waiter never returns, so exit would hang.

ยงSafety

The caller must complete process exit without waiting for stopped peers. Stopped coroutines and their pending operations are never resumed.