synchronized<T> method
Executes computation
when lock is available.
Only one asynchronous block can run while the lock is retained.
Implementation
Future<T> synchronized<T>(FutureOr<T> Function() computation,
{Duration? timeout}) {
return impl.objectSynchronized<T>(this, computation, timeout: timeout);
}