lock method

Future<void> lock({
  1. bool reentrant = false,
})

Implementation

Future<void> lock({bool reentrant = false}) => synchronized(() {
      Completer<void> c = Completer();
      _inLocks[identityHashCode(this)] = c;
      return c.future;
    });