How many threads can I run concurrently?

后端 未结 7 1687
梦谈多话
梦谈多话 2020-12-08 02:49

A comment to another of my questions says that I can only run \"so many\" threads concurrently, a notion which I have seen elsewhere.

As a threading novice, how can

相关标签:
7条回答
  • 2020-12-08 03:22

    It depends on hardware as you're (probably) not using a theoretical computer but a physical hardware one, so you have limited resources.

    Read: Does Windows have a limit of 2000 threads per process?

    Furthermore, even if you could run 5000+ threads, depending on your hardware, that could run much slower than a 10 thread equivalent program. I think you should take a look at thread pooling.

    0 讨论(0)
提交回复
热议问题