pub fn with_new_current_task<F, R>(
system_task: &Weak<Task>,
task_name: String,
f: F,
) -> Result<R, Errno>where
F: FnOnce(&CurrentTask) -> R,Expand description
Create a new system task, register it on the thread and run the given closure with it.