Developing your own solution

You can also have your worker threads create instances of a wxPython event (standard or custom) and send it to a specific window in the UI thread using the global function wx.PostEvent(window, event). The event is added to the internal pending event queue for that window, and wx.WakeUpldle is automatically called. The advantage of this approach is that the event would then walk through the typical wxPython event facility, meaning you get a lot of event handling functionality for free. The disadvantage is that you have to manage all of the thread and event processing that the wx.CallAfter() function performs for you.

Was this article helpful?

0 0

Post a comment