Exemplo n.º 1
0
 public void Push(BlockWithPosition block)
 {
     lock (_blocksLocker)
     {
         _blocks.Push(block);
     }
 }
Exemplo n.º 2
0
        public bool TryPop(out BlockWithPosition block)
        {
            var  _block = new BlockWithPosition();
            bool isOk   = false;

            lock (_blocksLocker)
            {
                isOk = _blocks.TryPop(out _block);
            }
            block = _block;
            return(isOk);
        }