P
Peter Rilling
Okay, I have the main thread which does all the work. This main thread
spawns a worker thread that just periodically poles the environment looking
for a certain condition. This second thread is very small, and only is
responsible for raising a flag when the environment changes.
What I want is for the main thread to raise an event when the change has
been flagged. I other words, I want the main thread to raise the event, not
this small worker thread. How can the worker thread talk to the main thread
so the resulting event can actually be raised in the main thread, not the
worker thread?
spawns a worker thread that just periodically poles the environment looking
for a certain condition. This second thread is very small, and only is
responsible for raising a flag when the environment changes.
What I want is for the main thread to raise an event when the change has
been flagged. I other words, I want the main thread to raise the event, not
this small worker thread. How can the worker thread talk to the main thread
so the resulting event can actually be raised in the main thread, not the
worker thread?