Function critical_section::with
source · [−]pub fn with<R>(f: impl FnOnce(CriticalSection<'_>) -> R) -> R
Expand description
Execute closure f
in a critical section.
Nesting critical sections is allowed. The inner critical sections are mostly no-ops since they’re already protected by the outer one.