Function task::take_kill_handler

source ·
pub fn take_kill_handler() -> Option<KillHandler>
Expand description

Takes ownership of the current Task’s KillHandler function.

The registered KillHandler function is removed from the current task, if it exists, and returned such that it can be invoked without holding the Task’s inner lock.

After invoking this, the current task’s kill handler will be None.

Locking / Deadlock

Obtains the lock on this Task’s inner state in order to mutate it.