J
John
Hi,
I have a worker thread that receives messages from a socket and puts
them in a queue (it sits inside a "while true") loop.
Each time it adds a message to the queue, I need the main thread to
pull a message off the queue and process it. Because it manipulates
GUI controls I need the main thread to do the dequeue and not the
worker thread.
Is there a way to make an event fire for the main thread instead of
the thread that's firing the event?
I thought about making the main application Monitor the queue, but
then the application events (like clicks on buttons) wouldn't happen.
Right?
Thanks,
John
I have a worker thread that receives messages from a socket and puts
them in a queue (it sits inside a "while true") loop.
Each time it adds a message to the queue, I need the main thread to
pull a message off the queue and process it. Because it manipulates
GUI controls I need the main thread to do the dequeue and not the
worker thread.
Is there a way to make an event fire for the main thread instead of
the thread that's firing the event?
I thought about making the main application Monitor the queue, but
then the application events (like clicks on buttons) wouldn't happen.
Right?
Thanks,
John