The maximum number of thread [duplicate]

若如初见. 提交于 2019-12-23 16:52:39

问题


What is the maximum number of thread in an application 32-bits and 64-bits developed in Delphi?

I need to know what is the limit of threads running simultaneously on a 32-bit application, because I'm doing performance analysis and I want to let the OS manage the execution order of the threads that are waiting.


回答1:


You might want to read this answer: https://stackoverflow.com/a/481919/1560865

Still, what I wrote in my comment above stays partially true (but please also notice Martin James' objection to it below).

Notice that - generally speaking - if you create way more threads than processor cores (or virtual equivalents), you will not gain any performance advantage. If you create too many, you'll even end up with pretty bad results like these: thedailywtf.com/Articles/Less-is-More.aspx So are you completely sure that you'll need the theoretically possible maximum number of threads?



来源:https://stackoverflow.com/questions/16973688/the-maximum-number-of-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!