فهرست منبع

优化下代码

tanghai 2 سال پیش
والد
کامیت
67dc43a6a4
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      Unity/Assets/Scripts/Core/World/Module/Fiber/ThreadPoolScheduler.cs

+ 1 - 2
Unity/Assets/Scripts/Core/World/Module/Fiber/ThreadPoolScheduler.cs

@@ -35,9 +35,8 @@ namespace ET
                 {
                     Thread.Sleep(1);
                     
-                    int n = this.fiberManager.Count() / this.threads.Count;
                     // count最小为1
-                    count = n > 1? n : 1;
+                    count = this.fiberManager.Count() / this.threads.Count + 1;
                 }
 
                 --count;