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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
cyberkiwiCommented:
Just use task manager, menu-> View, Columns, tick the "Thread Count"
0
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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
Geert GOracle 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.