public static void Initialize(int maxThreads, int _proxyTimeout, ProxyType _proxyType) { proxyTimeout = _proxyTimeout; proxyType = _proxyType; new Thread(() => Variables.XboxFN_FULL_CAP_title()).Start(); ThreadPool.SetMinThreads(maxThreads, maxThreads); Thread[] threads1 = new Thread[maxThreads]; for (int i = 0; i < maxThreads; i++) { threads1[i] = new Thread(() => { while (!Variables.combos.IsEmpty) { Variables.combos.TryDequeue(out string data); Worker(data); } }); threads1[i].Start(); } for (int i = 0; i < maxThreads; i++) { threads1[i].Join(); } Thread.Sleep(-1); }