Advantage of using Thread.Start vs QueueUserWorkItem

后端 未结 9 1611
有刺的猬
有刺的猬 2020-11-28 12:49

In multithreaded .NET programming, what are the decision criteria for using ThreadPool.QueueUserWorkItem versus starting my own thread via new Thread() and Thread.Start()?

9条回答
  •  北海茫月
    2020-11-28 13:14

    Most of my reading agrees with Marcel, the ability to control thread if something goes (Abort ...) is something that should be heavily considered particularly if you are dealing with 3rd party calls over which you have no control and may hang.

提交回复
热议问题