NUMBER OF THREADS

S

Sugandh Jain

Hi,

I am confused about the number of threads getting used when I run a desktop
application where multiple forms open up from different dlls used in the
project.

do they open on single thread or multiple forms open on the same UI thread.

Regards,
Sugandh Jain
 
G

Gabriel Lozano-Morán

There is 1 main thread since WinForms run in single-threaded apartment
state. Depending on your program you can have off course multiple foreground
and/or background threads. Threads in the threadpool are limited to 25
threads per CPU core. When you create threads you are limited by memory
which on 32-bit systems cannot exceed 2GB unless you specify the 3GB boot
option. Using performance counters you can monitor the number of active
threads in your process. Just start perfmon and then Performance Object .NET
CLR Locks And Threads.

Gabriel Lozano-Morán
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top