brokeMyLegBiking
asked on
trigger event in parent thread
Is there a way to trigger an event in a parent thread while the child thread is still running?
I can call a method when the child thread finishes using the asynch callback, but not while its running.
I can call a method when the child thread finishes using the asynch callback, but not while its running.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Assuming the two threads are inside the same class, you can create an event in the class, subscribe to it in the parent thread, and trigger it from the child thread. You can even add parameters to the event to allow you to pass data between them.
ASKER
That sounds great! can you give me a small sample, or point me to a link that shows some sample code?
What uKER described is excactly what I want to do. But i'm not sure how to declare a routine and subscribe that routine to a particular thread.
thx all!
What uKER described is excactly what I want to do. But i'm not sure how to declare a routine and subscribe that routine to a particular thread.
thx all!
ASKER
anyone have a sample?
You have posted this question also in the VB.NET section with 500 points! This is usually not allowed here. Please use a pointer to the original question.
"What if my question fits more than one technical area?"
https://www.experts-exchange.com/help.jsp#hi262