acquire abstract method

Future<GlobalLockHandle> acquire({
  1. Duration? timeout,
})

Waits for the lock and holds it until GlobalLockHandle.release.

If timeout is specified, this waits at most that Duration and throws a TimeoutException if the lock could not be acquired in time (Duration.zero tries once). If timeout is null (the default), this waits indefinitely.

Implementation

Future<GlobalLockHandle> acquire({Duration? timeout});