[corlib] CoreRT System.Threading.Tasks (#6672)
[mono-project.git] / mcs / class / corlib / corert / RuntimeThread.cs
blobec594a264d596c16ced7e3fd2c84a7100f3a8eae
1 using System;
2 using System.Threading;
4 namespace Internal.Runtime.Augments
6 class RuntimeThread
8 readonly Thread thread;
10 RuntimeThread (Thread t) { thread = t; }
12 public void ResetThreadPoolThread () {}
14 public static RuntimeThread InitializeThreadPoolThread () => default;
16 public static RuntimeThread Create (ParameterizedThreadStart start, int maxStackSize)
17 => new RuntimeThread (new Thread (start, maxStackSize));
19 public bool IsBackground
21 get => thread.IsBackground;
22 set => thread.IsBackground = value;
25 public void Start () => thread.Start ();
27 public void Start (object state) => thread.Start (state);
29 public static bool Yield () => Thread.Yield ();
31 public static bool SpinWait (int iterations)
33 Thread.SpinWait (iterations);
34 return true;