YieldFor. How to avoid wx.CallAfter events or custom events?

I’m afraid subclassing PyEvent will be a dead end and these other EventCategories are wx internals, or at least not meant to be used from wxPython (there are threading classes in wx & this CATEGORY_THREAD will be used by those, I think)

but Python has much more to offer than threads and if your Gui is chocked then you should move everything else into a different process (look at a browser how many workers they pull up right from the start :rofl:) and do in the Gui process only Gui stuff

here is a nice example of a process pool executor