Пример #1
0
 public void PutWorkingBlock(DataBlock block)
 {
     lock (blockQueue)
     {
         blockQueue.Add(block);
         WorkingCount++;
     }
     workingBlockSemaphore.Release();
 }
Пример #2
0
 public void PutFreeBlock(DataBlock freeBlock)
 {
     lock (blockQueue)
     {
         blockQueue.Insert(0, freeBlock);
         freeCount++;
     }
     freeBlockSemaphore.Release();
 }