The maximum number of threads in the Metro application

What is the maximum number of threads that you can create in a C # application for the Windows 8 Metro interface? And what happens when you reach this limit? Is any exception thrown?

+4
source share
3 answers

I think there is no limit. The maximum number of threads is determined by the number of available resources.

And, as Henk said, if you need to ask what the maximum number of threads is, you are probably doing something wrong.

+2
source

Threads are very expensive. You should focus on creating as little as possible.

What happens when you reach this limit?

Your computer will slow down long before this limit is reached.

Is an exception of some kind?

OOM, most likely, if the user does not first throw the computer out of the window.

+5
source

Before you create one thread, ask yourself if you can use threadpool .

+2
source

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


All Articles