I have three threads a main thread and two worker threads.
Worker thread one just polls and processes serial comms data
after its done processing it sends information back to the main thread.
the 2nd worker thread just runs a simple finite state machine
how do i pass the information to the worker thread from the main thread?
i don't know how to pass information to a thread that is already runninng.
i need to pass information to my 2nd worker thread in order for the states to change.
i've been using this as reference
http://wiki.wxwidgets.org/Inter-Thread_ ... munication
could you please give me a simple example on how to do this thanks.
Inter-Thread Communication.
Re: Inter-Thread Communication.
The link you posted already contains everything you need. When multithreading is involved, there are hardly any really simple samples.
You should take a look at wxMessageQueue:
http://docs.wxwidgets.org/trunk/classwx ... _01_4.html
You should take a look at wxMessageQueue:
http://docs.wxwidgets.org/trunk/classwx ... _01_4.html
Use the source, Luke!
Re: Inter-Thread Communication.
thanks.
i decided just to use globals with locks.
i decided just to use globals with locks.