The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by gmhe]

hello,
i would like to have an solution for following problem:
i started a various count of named threads. after that, i would like to know,
what is the status of each thread. but how can i make an assoziation between
the items of process.processthreadcollections and my started threads.
because, i found no id or name in this class.
thank you for respond.
he
import-bot (20211) [Avatar] Offline
#2
Re: threadcollection
[Originally posted by alan]

This is covered to some degree on page 92 of the book. The short answer is
that you need to have each thread that you're interested in monitoring save
its thread id. The first thing I'd have each thread do is call
AppDomain.GetCurrentThreadId and save the value.

Hope this helps,
Alan