completeWhere method

void completeWhere(
  1. (bool, T?) fun(
    1. EventxxQueueItem_c<T, T1> item
    )
)

Implementation

void completeWhere((bool, T?) Function(EventxxQueueItem_c<T, T1> item) fun) {
  list.removeWhere((item) {
    final (doComplete, result) = fun.call(item);
    if (doComplete) {
      item.result.complete(result);
      return true;
    }
    return false;
  });
}