static void MonitorInput() { while (true) { int workerTotal, completionTotal; ThreadPool.GetAvailableThreads(out workerTotal, out completionTotal); LogFormat("worker threads:{0},completion port threads:{1}", workerTotal, completionTotal); string input = Console.ReadLine(); if (input.Equals("-hide")) { Hide(); continue; } DateTime reserveDate; if (DateTime.TryParse(input, out reserveDate)) { var signHelper = new SignCardHelper(new ManualResetEvent(false)); //Helpers.Add(mre); //ThreadPool.QueueUserWorkItem(signHelper.ThreadPoolCallback, reserveDate); new Thread(signHelper.ThreadPoolCallback).Start(reserveDate); } } }
static void MonitorInput() { while (true) { int workerTotal, completionTotal; ThreadPool.GetAvailableThreads(out workerTotal, out completionTotal); LogFormat("worker threads:{0},completion port threads:{1}", workerTotal, completionTotal); string input = Console.ReadLine(); if(input.Equals("-hide")) { Hide(); continue; } DateTime reserveDate; if (DateTime.TryParse(input, out reserveDate)) { var signHelper = new SignCardHelper(new ManualResetEvent(false)); //Helpers.Add(mre); //ThreadPool.QueueUserWorkItem(signHelper.ThreadPoolCallback, reserveDate); new Thread(signHelper.ThreadPoolCallback).Start(reserveDate); } } }