none
How to find thread state in windows OS?

    Question

  • I have an app which creates threads dynamically, and I need to know which thread is in running / suspend /ready state for any instance..

    So would there be any way possible to do such run time accounting of all threads in any application?

    Please reply for any pointer.


    ashish
    Monday, December 20, 2010 9:28 AM

All replies

  • if you use begininvoke with delegates then you get return IAsyncResult value when it endinvoke so in between when you start the asynchronous call by begininvoke so you put entry in database for running when thread works its process when you put while loop for one thread waiting so its a ready and when IAsyncResult is arrived to endinvoke so its a suspend.

    For more information refer following link:

    http://msdn.microsoft.com/en-us/library/system.iasyncresult.aspx

    Monday, December 20, 2010 5:09 PM