Thread.Start() versus ThreadPool.QueueUserWorkItem()

前端 未结 7 2106
长发绾君心
长发绾君心 2020-12-12 16:20

The Microsoft .NET Base Class Library provides several ways to create a thread and start it. Basically the invocation is very similar to every other one providing the same k

7条回答
  •  自闭症患者
    2020-12-12 16:59

    ThreadPool.QueueUserWorkItem() is basically for fire-and-forget scenarios, when application doesn't depend on whether operations will finish or not.

    Use classic threads for fine-grained control.

提交回复
热议问题