lock<T> abstract method
Runs callback in a critical section.
If abortTrigger completes before the critical section was entered, an
AbortException is thrown and callback will not be invoked.
Implementation
Future<T> lock<T>(Future<T> Function() callback,
{Future<void>? abortTrigger});