A
Abubakar
Hi,
in my application, different threads send notifications to GUI thread
through sendmessage api. They have special integer numbers inside the wParam
arg of sendmessage which the gui thread uses to display messages in the
textboxes etc. My question is that in case the threads send messages very
fast (which does NOT always happen in my app), faster than the gui thread is
processing them, are the messages qued automatically (btw the gui part when
starts processing on a message, it calls entercriticalsection and when its
done calls leavecriticalsection. I added these because I thought they would
be needed, but gui thread is just one thats going to work on the message
received and thats y I'm not sure I will need this critical section api
calls here or not. Need some comments on this approach also.)?
Example (writing here what I think the way things work):
thread 1 sends message1
thread 2 sends message2 (qued)
thread1 send message 3 (qued)
gui thread processes message1
gui thread processes msg2
thread2 sends message4
gui thread processes message3
gui thread processes message4
everything done nicely, I had to do no queing my self.
Is that what happens?
Regards,
Abubakar.
in my application, different threads send notifications to GUI thread
through sendmessage api. They have special integer numbers inside the wParam
arg of sendmessage which the gui thread uses to display messages in the
textboxes etc. My question is that in case the threads send messages very
fast (which does NOT always happen in my app), faster than the gui thread is
processing them, are the messages qued automatically (btw the gui part when
starts processing on a message, it calls entercriticalsection and when its
done calls leavecriticalsection. I added these because I thought they would
be needed, but gui thread is just one thats going to work on the message
received and thats y I'm not sure I will need this critical section api
calls here or not. Need some comments on this approach also.)?
Example (writing here what I think the way things work):
thread 1 sends message1
thread 2 sends message2 (qued)
thread1 send message 3 (qued)
gui thread processes message1
gui thread processes msg2
thread2 sends message4
gui thread processes message3
gui thread processes message4
everything done nicely, I had to do no queing my self.
Is that what happens?
Regards,
Abubakar.