开发者

Questions about the ThreadPool

I have a few questions about the ThreadPool. Primarily开发者_如何学JAVA, If I wanted to limit the number of threads in execution asynchronously, what would I change? Secondly, in set maximum and set minimum number of threads, what are the completion port threads?


Don't mess with the ThreadPool (i.e. limiting threads) - it isn't yours to mess with, and core parts of the system will want it. You risk starvation and deadlock.

Either use a custom thread-pool implementation, or use the inbuilt options in the TPL to run an operation on a constrained number of threads.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜