using System;
using System.Collections.Generic;
using System.Threading;
public class Program
{
public static void Main()
List<Thread> threads = new List<Thread>();
for (int i = 0; i < 1000; i++)
int iCopy = i;
var t = new Thread(() =>
Thread.Sleep(1000);
Console.WriteLine($"Thread {iCopy}");
})
{IsBackground = true};
threads.Add(t);
t.Start();
}
Console.WriteLine("Done");
Thread.Sleep(3000);