How can I monitor the status of a thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JnrJnr
    New Member
    • Oct 2009
    • 88

    #1

    How can I monitor the status of a thread

    Hi people Im new to threading and I'm trying to monitor or destinguish when my thread has started and stopped running.
    Is there a good way to do this?
    Please help
  • JnrJnr
    New Member
    • Oct 2009
    • 88

    #2
    Code:
    private delegate void checkStatus(string status);
    private void TheThread()
    {
       begininvoke(new checkStatus(statusMeth), "Started");
       //statements
       begininvoke(new checkStatus(statusMeth), "finished");
    }
    private void statusMeth(string status)
    {
       console.writeline(status);
    }

    Comment

    Working...