Can you use wxMutex in an event handler?
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.
精彩评论