3 ms·
I guess the issue is that making thread-safe GUIs is incredibly hard. So all GUI frameworks require you to update the GUI state only in the 'GUI thread'. Which
by antrix 15y ago
I guess the issue is that making thread-safe GUIs is incredibly hard. So all GUI frameworks require you to update the GUI state only in the 'GUI thread'. Which means we use hacks like 'runOnMainThread', etc. to update the GUI.
A saner way is to implement an event bus and send update events to it letting the main thread update itself from the bus. Some frameworks do use this model but really, it would be much nicer if the language itself could do this.