Exemplo n.º 1
0
 public T GetBlock(int consumerId)
 {
     if (!circBuffer.ConsumerCanRead(consumerId))
     {
         if (EndOfStream(consumerId))
         {
             throw new Exception("Cannot read block when EOS is reached");
         }
         while (!circBuffer.ConsumerCanRead(consumerId))
         {
             Thread.Sleep(20);
         }
     }
     ;
     return(circBuffer.ConsumerGet(consumerId));
 }