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