Block() публичный Метод

public Block ( ) : void
Результат void
Пример #1
0
        private int Lock(bool block)
        {
            queue.Block();

            if (block)
            {
                while (!queue.AllReceiversBlocked)
                {
                    if (IsUsingMultithreading)
                    {
                        Thread.Sleep(1);
                    }
                    else
                    {
                        TickNonMultithreaded();
                    }
                }
            }

            nextLockID++;
            locks.Add(nextLockID);
            return(nextLockID);
        }