static void Main(string[] args)
{
Console.WriteLine("Start");
ThreadPool.QueueUserWorkItem(ComputeBoundOp, 3);
Console.WriteLine("Main Doing the work");
Thread.Sleep(10000);
Console.WriteLine("Main Finished");
Console.ReadLine();
}
private static void ComputeBoundOp(object state)
{
Console.WriteLine("in the thread");
Thread.Sleep(1000);
}
C# 线程池
最新推荐文章于 2025-01-09 17:58:02 发布
1099

被折叠的 条评论
为什么被折叠?



