开发者

In wxwidgets, how do I lock a vector that is shared between gui thread and worker thread?

开发者 https://www.devze.com 2022-12-17 20:09 出处:网络
If I can\'t call lock on a mutex in the main application thread (my event handler because you can\'t lock the main gui thread), how do I share any infor开发者_如何学Pythonmation between my worker and

If I can't call lock on a mutex in the main application thread (my event handler because you can't lock the main gui thread), how do I share any infor开发者_如何学Pythonmation between my worker and my main thread?


Just have your worker thread communicate with the main thread through the event handling system. Use AddPendingEvent to send status messages back to the main thread and ProcessEvent to handle the updates.

0

精彩评论

暂无评论...
验证码 换一张
取 消