public async void Run() { while (!IsClosed) { if (!Deliver()) { await _backoff.Now(_backoffTokenSource.Token); } } }
public void Run() { while (!IsClosed) { if (!Deliver()) { backoff.Now(); } } }
public void Run() { while (!closed.Get()) { if (!Deliver()) { backoff.Now(); } } }
public void Run() { while (open) { if (parent.CanSend()) { if (messages.TryDequeue(out IMessage delayed)) { backoff.Reset(); parent.Send(delayed); } else { backoff.Now(); } } else { backoff.Now(); } } }
public async void Run() { while (!IsClosed) { if (!Deliver()) { try { await _backoff.Now(_backoffTokenSource.Token); } catch (ObjectDisposedException) { // nothing to do } } } }