On Mar 21, 2006, at 11:33 AM, Norman Palardy wrote:


On Mar 21, 2006, at 7:57 AM, Charles Yeomans wrote:

But these approaches don't really answer his question, which is a way to detect when a thread finishes. This seems to be a trickier problem. One way is to use a Timer to check the State property from time to time. Or perhaps one could do some trick with a semaphore so that one thread is blocked until the specific thread releases the semaphore.

Or register a handler (an observer) that the thread calls when it's completed and about to leave the Run event. Or, if you've just dragged an instance of the thread onto a Window, create an event in the thread that it calls as it exits the Run event.

But wouldn't this event handler be invoked in the thread, as opposed to the other thread that wants to know when this specific thread is finished?

--------------
Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to