4 ms·
Presumably you will also be okay in a multi-threaded program if only one thread touches Xlib. That would be the sensible way to write a GUI anyway because multi
by cjfd 7y ago
Presumably you will also be okay in a multi-threaded program if only one thread touches Xlib. That would be the sensible way to write a GUI anyway because multi-threading should only be used if it is necessary and not just for the heck of it. If expensive computation is used to calculate the things displayed in the GUI, this should be done by worker threads while the GUI does not need to be multi-threaded. If, on the other hand, one depends on external processes it makes more sense to use a single thread but use it asynchronously. Very few GUI benefit from multi-threading. Note that javascript is also executed single threadedly in browsers.
- josefx 7y ago> Note that javascript is also executed single threadedly in browsers. Currently browsers run multiple processes for their UI and the loaded websites. Back when this wasn't the case it took just a single badly behaving site to hang everything.
- cjfd 7y agoThat is not at all or in any way what I said......