Переглянути джерело

ConcurrentQueue isEmpty

效率
cpf 8 роки тому
батько
коміт
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()
 		public void Update()
 		{
 		{
-			while (this.queue.Count > 0)
+			while (!this.queue.IsEmpty)
 			{
 			{
 				Action a;
 				Action a;
 				if (this.queue.TryDequeue(out a))
 				if (this.queue.TryDequeue(out a))