tquit

Number0x0B
Signature(status) -> never returns
Grouptask
Since1.0

Terminate the calling thread. Its status is delivered to any thread blocked in tjoin on it.

If it is the last thread in the process, the whole process exits (equivalent to pquit with the same status).

Pitfalls

There is no way to terminate another thread. A thread ends only by returning from its entry or calling tquit itself since threads within a process share an address space and a trust domain, so there is no boundary for a cross-thread kill to enforce. Asynchronous thread termination, if ever needed, would come through a future suspend/inspect primitive, not a peer-to-peer kill.

Arguments

RegisterNameDescription
r0statusExit status, readable by a joiner via tjoin

Returns

Does not return.

See also