Worker Thread notification in the middle.
-
Hi, A worker thread is running the threadproc. While it is running i want to send some data to it from main thread. How to do this? Thanks in advance. jagadeesh
-
Hi, A worker thread is running the threadproc. While it is running i want to send some data to it from main thread. How to do this? Thanks in advance. jagadeesh
-
Hi, A worker thread is running the threadproc. While it is running i want to send some data to it from main thread. How to do this? Thanks in advance. jagadeesh
There are several methods to do this: 1) Use a global variable that stores the data you want to send to the worker thread; 2) Use a singleton; 3) Use files; I'd go with a singleton, that seems the be the most 'clean'. Remember to synchronise your data, since it will most likely be accessed by multiple threads (avoid corrupt data!). There are probably some other methods you can use. Er zit een korstje op mijn aars.
-
Hi, A worker thread is running the threadproc. While it is running i want to send some data to it from main thread. How to do this? Thanks in advance. jagadeesh
-
Hi, A worker thread is running the threadproc. While it is running i want to send some data to it from main thread. How to do this? Thanks in advance. jagadeesh
Since the thread does not have a message pump, using
PostMessage()
is out of the question. I think you are left with synchronization and events at this point.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb