title: Producer/Consumer with BufferBlock, how to awake periodically, even if there is no product in the buffer?
body: <p><strong>Context</strong></p>
  <p>In my .NET 5 console application my consumer runs as a thread (Task). Currently there is only one, but in the future it is possible to have concurrent racing consumers on the very same BufferBlock instance.</p>
  <p>The current implementation runs fine.
  I stuck with implementing the following added feature:</p>
  <p>I would like wake up in a configured period, even the buffer is empty, and still remain in the main loop.
  This use case must be distinguishable from the wake up by token's IsCancellationRequested,
  but optional distinguishing it from the &quot;product is available to consume&quot; is not mandatory.</p>
  <p>I do see the overload of <code>ReceiveAsync</code> with timeout, but it is not clear how <code>OutputAvailableAsync</code> is involved, which do not accepts timeout.</p>
  <p><strong>Question</strong></p>
  <p>How to implement to wake up in a given time period, and remain in the loop. Only in case IsCancellationRequested should break the loop</p>
  <pre><code>public class MyConsumer
  {
      private readonly BufferBlock&lt;MyProduct&gt; _products;
  
      public void Start(CancellationToken token)
      {
          Task.Factory.StartNew(() =&gt; Run(token), token);
      }
  
      private async Task Run(CancellationToken token)
      {
          await ConsumeAsync(token);
      }
  
      private async Task ConsumeAsync(CancellationToken token)
      {
          while (await _products.OutputAvailableAsync(token))
          {
              var product = await _products.ReceiveAsync(token);
              // Consume product goes here:...
  
              // I would like wake up here in a configured period, even the buffer is empty.
              //
              // How to implement this timeout based wake up? (then still remain in the loop)
              // I do not even understand clearly why are we using the two waiting operations, 
              // the 1) OutputAvailableAsync(token) then 2) ReceiveAsync(token)
          }
      }
  }
  </code></pre>