跨线程send message

今天同事问了一个问题,说在线程中send message 和直接调用是否是同样,他以为是同样的,可是线程跟踪却发现处理过程是在接收消息队列完成。回家看到博客园上的一番争论才有些明白,这里贴出来,共勉app

http://bbs.csdn.net/topics/390715501?page=1spa

If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message..net

相关文章
相关标签/搜索