dWorld.Foundation.Utility.Threading.dLightWeightProcessThread.Init C# (CSharp) Method

Init() static private method

static private Init ( int _nThreadCount ) : void
_nThreadCount int
return void
		internal static void Init (int _nThreadCount)
		{
			lock (m_Lock) {
				m_nRefCount++;
				if (m_nRefCount == 1) {
					m_Processes = new MPCList<dLightWeightProcessBase> ();

					ThreadProcess.Init ();

					m_Threads = new List<Thread> ();
					int nThreadCount = _nThreadCount;
					for (int i = 0; i < nThreadCount; i++) {
						Thread thread = new Thread (delegate () { ThreadProcess process = new ThreadProcess (); process.MainLoop (); });
						thread.Name = String.Format ("dLightWeightProcessThread_{0}", i);
						thread.Start ();

						m_Threads.Add (thread);
					}
				}
			}
		}

Same methods

dLightWeightProcessThread::Init ( ) : void