Просмотр исходного кода

ConcurrentQueue isEmpty

效率
cpf 8 лет назад
Родитель
Сommit
2dc259c54d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Server/Model/Other/OneThreadSynchronizationContext.cs

+ 1 - 1
Server/Model/Other/OneThreadSynchronizationContext.cs

@@ -16,7 +16,7 @@ namespace Model
 
 		public void Update()
 		{
-			while (this.queue.Count > 0)
+			while (!this.queue.IsEmpty)
 			{
 				Action a;
 				if (this.queue.TryDequeue(out a))