开发者

Can you use wxMutex in an event handler?

开发者 https://www.devze.com 2022-12-18 04:17 出处:网络
Is it possible to use wxMutex->Lock() in an event handler? Since it\'s the main program thread (gui thread) it 开发者_开发知识库can\'t sleep right?You certainly can - it\'s not going to blow up your c

Is it possible to use wxMutex->Lock() in an event handler? Since it's the main program thread (gui thread) it 开发者_开发知识库can't sleep right?


You certainly can - it's not going to blow up your computer or melt your hard drive or cause demons to fly out of your nostrils if you try.

That said, doing anything on your UI thread that might block is bad, bad, bad, bad, bad.

So while you technically can, you really shouldn't.

0

精彩评论

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