static void Main(string[] args)
{
  new Thread(() => TaskMethod("A")).Start();// False
  new Thread(() => TaskMethod("B")).Start();// False
  Task.Run(() => TaskMethod("C"));// True
  Task.Factory.StartNew(() => TaskMethod("D"));// True
  Task.Factory.StartNew(() => TaskMethod("E"), TaskCreationOptions.LongRunning);// False
  Task.Factory.StartNew(() => TaskMethod("F"), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);// True
}

static void TaskMethod(string name)
{
  // IsThreadPoolThread:如果该线程属于托管线程池,则为true;否则,是false。
  Console.WriteLine($"Task {name} is running on a thread id {Thread.CurrentThread.ManagedThreadId}. " +
  $"Is thread pool thread:{Thread.CurrentThread.IsThreadPoolThread}");
}