Thread Pool vs Thread Spawning

前端 未结 12 1642
梦如初夏
梦如初夏 2020-12-08 00:27

Can someone list some comparison points between Thread Spawning vs Thread Pooling, which one is better? Please consider the .NET framework as a reference implementation tha

12条回答
  •  一整个雨季
    2020-12-08 01:12

    It depends on what you want to execute on the other thread.

    For short task it is better to use a thread pool, for long task it may be better to spawn a new thread as it could starve the thread pool for other tasks.

提交回复
热议问题