最大线程数 [英] The maximum number of thread

查看:109
本文介绍了最大线程数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Delphi中开发的32位和64位应用程序中最大线程数是多少?

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

我需要知道运行线程的限制是多少同时在32位应用程序上运行,因为我正在执行性能分析,并且希望让OS管理正在等待的线程的执行顺序。

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.

推荐答案

您可能需要阅读以下答案: https://stackoverflow.com/a/481919/1560865

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

还是,我在我在上面的评论保持部分正确(但也请注意马丁·詹姆斯(Martin James)对此的反对意见)。

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


请注意-一般而言,如果创建的线程数多于
个处理器内核(或虚拟等效物),您将不会获得任何
的性能优势。如果创建过多,甚至会得到
这样的非常糟糕的结果:
thedailywtf.com/Articles/Less-is-More.aspx 那么您是否完全确定
您将需要理论上可能的最大线程数?

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?

这篇关于最大线程数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆