What is the maximum number of threads that a Rust program can create?

I see conflicting information about the maximum number of threads that Rust can cause; some offer arbitrary numbers, such as "32", sometimes several of the number of cores that the processor has.

+5
source share
1 answer

Threads provided by the Rust standard library are “OS threads,” meaning they use the capabilities of your operating system.

Therefore, the Rust program does not have the restrictions imposed by Rust itself, but rather, this restriction will be the result of what your OS allows. You must know the OS in order to find out the true answer, which will be different for this OS. For example, see this question: What is the maximum number of threads for a process on Linux?

+5
source

Source: https://habr.com/ru/post/1276181/


All Articles