enqueue method

Future<T> enqueue(
  1. Future<T> fun()
)

Implementation

Future<T> enqueue(Future<T> Function() fun) async {
  final op = Reducer<T>(operation: fun);

  if (!_tryUnlock(op)) {
    _queue.add(op);
  }

  return op.completer.future;
}