pub unsafe fn task_callbacks<FBefore, FEnter, FExit, FAfter>(
f_before: FBefore,
f_enter: FEnter,
f_exit: FExit,
f_after: FAfter,
)Expand description
ยงSafety
The user must ensure that the pointer returned by before has a 'static lifetime.
This pointer will be owned by the spawned task for the duration of that task, and
ownership will be returned to the user at the end of the task via after.
The pointer remains opaque to the runtime.
Does nothing if task callbacks have already been set, use
task_opt_callbacks to check whether they were set.