Skip to main content

current_task_clone_try

Function current_task_clone_try 

Source
pub fn current_task_clone_try() -> Option<Arc<Task>>
Expand description

Best-effort, non-blocking variant of current_task_clone.

Returns None when the scheduler lock is contended. Useful in cleanup paths where blocking on SCHEDULER.lock() could deadlock.