public override void SingletonCreation() { var us = EiUpdateSystem.Instance; var processors = Math.Max(1, Environment.ProcessorCount - 1); for (int i = 0; i < processors; i++) { var thread = new ThreadContainer(10000); var node = threads.Add(thread); thread.SetNode(node); } var inst = EiUnityThreading.Instance; EiUnityThreading.CloseThreads.SubscribeThreadSafe(CloseThreads); }
protected override void OnSingletonCreated() { var us = UpdateSystem.Instance; var processors = Math.Max(1, Environment.ProcessorCount - 1); for (int i = 0; i < processors; i++) { var thread = new ThreadContainer(10000); var node = threads.Add(thread); thread.SetNode(node); } var inst = UnityThreading.Instance; UnityThreading.CloseThreads.Subscribe(CloseThreads, true); }