How many threads are launched?

If I create a simple form and i add a button on it to create and
run a single thread in task manager i should see for my application
only 2 threads right?
jaja2005Asked:
Who is Participating?
 
Geert GConnect With a Mentor Oracle dbaCommented:
the thread will only run during the communication

procedure to send msg
start thread to send
  in thread:
    send data of msg
    wait for response
    handle response (buffer)
    close thread
signal data arrived in component
0
 
Emmanuel PASQUIERFreelance Project ManagerCommented:
Yes, one for the main application thread and one for your own thread.
0
 
Emmanuel PASQUIERFreelance Project ManagerCommented:
You can use Sysinternals microsoft tools to view that. Especially the Process Explorer tool : procexp.exe

http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
cyberkiwiCommented:
Just use task manager, menu-> View, Columns, tick the "Thread Count"
0
 
jaja2005Author Commented:
Thx. I am becoming cracy because i see 3 threads in task manager. In the excute method i create an object which i think is the responsible of it. In fact if i leave the method empty i see only 2 thread.
0
 
Emmanuel PASQUIERFreelance Project ManagerCommented:
yes, I almost added "if you don't create other components that create threads", but since you specified "simply one form and a thread"....
To be sure, what is that object you create ?
0
 
jaja2005Author Commented:
0
 
Emmanuel PASQUIERFreelance Project ManagerCommented:
SNMP... I'm not surprised it creates a thread. Protocols like very much separate threads. They are always waiting for something, and need to be responsive so it would do no good to work in the main thread, mixing with your application message loop (which its main purpose is to handle GUI & system events).
0
 
Geert GOracle dbaCommented:
components for communication over the network usually have a "async" or "asynchronous" property
with this boolean checked they use a thread for providing that functionality
0
 
jaja2005Author Commented:
Support:

I'm not sure why you're seeing an additional thread here, but I checked with
our developers and we don't create any threads ourselves. We can look into
this further, but from what our developers have told me there are not
threads, or even dependencies on CreateThread etc here.
0
 
jaja2005Author Commented:
Process Explorer tool ...nice tool.!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.