Exemple #1
0
 public async void Run()
 {
     while (!IsClosed)
     {
         if (!Deliver())
         {
             await _backoff.Now(_backoffTokenSource.Token);
         }
     }
 }
 public void Run()
 {
     while (!IsClosed)
     {
         if (!Deliver())
         {
             backoff.Now();
         }
     }
 }
Exemple #3
0
 public void Run()
 {
     while (!closed.Get())
     {
         if (!Deliver())
         {
             backoff.Now();
         }
     }
 }
Exemple #4
0
 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();
         }
     }
 }
Exemple #5
0
 public async void Run()
 {
     while (!IsClosed)
     {
         if (!Deliver())
         {
             try
             {
                 await _backoff.Now(_backoffTokenSource.Token);
             }
             catch (ObjectDisposedException)
             {
                 // nothing to do
             }
         }
     }
 }