call stack tracing for Threads in Thread pool

R

Rakesh

Hey,

I am using delegates for asynchoronus communication. Its internally use
threads from thread pool.
I want to know whether this thread pool is on Application level or
System level?

If this is on system level, IS there any way to find out ,How many
thread my appliaction is using at any point of time?

My requirement is that whenever any thing goes wrong or an exception is
thrown out in my system, I need to dump thread state/ and its call
stack into a log file.

In this system most of the task are executed by delegaes in
asynchronous mode. If all those thread are created by us then we can
easily manage this situation.
Is their any other approach?

Thanks
Rakesh
Agilent Technology International
 
S

Samuel R. Neff

Each app has it's own thread pool.

If you need to keep track of how many threads are in use and/or get
references to them, create a ThreadPoolProxy class that declares a
WaitCallback delegate and provides information about started/finished
state, access to the thread itself, and a way to iterate them.

HTH,

Sam
 
R

Rakesh

Thanks for replying , but now on this stage I can not change all
BeginInvoke call to WaitCallBack mechanism. Is there any way to find
out which thread is runing for an particular asynchronous delegate.

Or we need to simulate all framework itself?

Thanks
Rakesh
 

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