catchFromPool method

FutureOr<C> catchFromPool({
  1. Duration? timeout,
})
inherited

Implementation

FutureOr<O> catchFromPool({Duration? timeout}) {
  if (_pool.isEmpty) {
    return _catchFromEmptyPool(timeout);
  } else {
    return _catchFromPopulatedPool().resolveMapped((o) {
      if (o != null) return o;
      return createPoolElementForced();
    });
  }
}