简体   繁体   English

C ++ Boost线程在MFC中锁定了GUI线程

[英]C++ boost threads are locking GUI thread in MFC

Boost线程有没有办法在不阻止GUI消息泵的情况下等待线程完成?

Don't put things in that way. 不要那样做。 Wait means blocking, so answer is no. 等待意味着阻止,所以答案是否定的。 If I understood correctly your question my advice is to do the opposite: when your thread is done call PostMessage to the window you want notify with some custom message. 如果我正确理解了您的问题,我的建议是采取相反的措施:线程完成后,将PostMessage调用到您要通过一些自定义消息进行通知的窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM