Archived Forum Post

Index of archived forum posts

Question:

putMaxThreads limit

May 30 '17 at 15:20

Hi!

I need more than 500 threads. I run 3-4 copies of program to make 1500-2000 threads. Is it possible to run 2000 threads from single program?

Delphi dll.


Answer

I really don't know. You'd have to research the topic. For example, Google "max threads for a Windows program", or something like that.


Answer

By default each thread will reserve 1MB of stack space, so the top value are 2000 threads for win32. I have create 1600 threads before error in win32, and more than 6000 without error in win64. putMaxThreads default value is 100. The maximum value is 500. When i use CkGlobal_putMaxThreads(global,600) , and creates 600 asynchronous tasks, program creates only 500 threads, ignoring 100 extra threads.