suspend_all

Function suspend_all 

Source
pub unsafe fn suspend_all() -> SchedulerSuspendGuard
Expand description

Suspends the scheduler, preventing context switches. No other tasks will be run until the returned guard is dropped.

ยงSafety

API functions that have the potential to cause a context switch (e.g. delay, get_notification) must not be called while the scheduler is suspended.