private (int, Action[]) Drain() { lock (_lock) { return(_queue.Drain()); } }
private (int, Func <Task>[]) Drain() { lock (_lock) { return(_queue.Drain()); } }
private (int, Action[]) Drain() { bool lockTaken = false; try { _spinLock.Enter(ref lockTaken); return(_queue.Drain()); } finally { if (lockTaken) { _spinLock.Exit(false); } } }