thread-state

How do I get the current state of a thread (e.g. blocking, suspended, running, etc..) in win32?

I couldn't find a documented API that yields this information. A friend suggested I use NtQuerySystemInformation. After looking it up, the information is there (see SYSTEM_THREAD ) but it is undocumented, and not very elegant - I get the information for all threads in the system. Do you know of a more elegant, preferably documented API...

How to tell if a thread has exited successfully?

According to the MSDN Documentation for ThreadState, the Stopped state can be entered by one of two ways: the thread exiting, or the thread being aborted. Is there some mechanism for telling whether a thread has entered the Stopped state by exiting normally? Thanks! ...

How to check if Thread finished execution

I have following problem: I want to check (C#) if thread has finished execution, i.e. if the thread method returned. What I do now is call Thread.Join(1), but this gives 1 ms delay. Is there any way to simply check if thread finished. Inspecting Thread.ThreadState just seems too cumbersome. ...

Multi thread worker thread status

I create my threads as for (int i = 0; i < threadCount; i++) { Searcher src = new Searcher(i, this); threads[i] = new Thread(new ThreadStart(src.getIpRange)); threads[i].Name = string.Format(i.ToString()); } foreach (Thread t in threads) { t.Start(); } with threadCount(= 100, 150, 255 etc...) but I can...