Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateGateThread()

static void System.Threading.PortableThreadPool.GateThread.CreateGateThread ( PortableThreadPool threadPoolInstance)
inlinestaticprivate

Definition at line 299 of file PortableThreadPool.cs.

300 {
301 bool flag = false;
302 try
303 {
304 Thread thread = new Thread(GateThreadStart, 262144)
305 {
306 IsThreadPoolThread = true,
307 IsBackground = true,
308 Name = ".NET ThreadPool Gate"
309 };
310 thread.UnsafeStart();
311 flag = true;
312 }
313 finally
314 {
315 if (!flag)
316 {
317 Interlocked.Exchange(ref threadPoolInstance._separated.gateThreadRunningState, 0);
318 }
319 }
320 }

References System.Threading.PortableThreadPool._separated, System.Threading.Interlocked.Exchange(), System.Threading.PortableThreadPool.CacheLineSeparated.gateThreadRunningState, System.Threading.PortableThreadPool.GateThread.GateThreadStart(), System.Name, and System.Threading.Thread.UnsafeStart().

Referenced by System.Threading.PortableThreadPool.GateThread.EnsureRunningSlow().