-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Jean-Michel Gonet edited this page Jan 26, 2019
·
14 revisions
Mark these words with fire and iron: You do not call GUI functions from another thread. You only do that from the main thread(also called gui thread). You could do it from another thread but you need to acquire some specific GDK locks first, if I remember correctly. https://ubuntuforums.org/showthread.php?t=2103045
Further reading:
- See an example of multi-threading. Note the use of Glib::Dispatcher: https://developer.gnome.org/gtkmm-tutorial/stable/sec-multithread-example.html.en
- Using a Glib::Dispatcher: https://developer.gnome.org/gtkmm-tutorial/stable/sec-using-glib-dispatcher.html.en
- https://developer.gnome.org/gtkmm-tutorial/stable/sec-xeventsignals.html.en
- true if the event has been handled, and nothing is left to do. In this case the event is considered as dealt with.
- false if the event has not been handled, or there is still work to do. In this case, the event is transmitted to the parent.
- https://stackoverflow.com/questions/2762568/c-c-include-header-file-order
- https://stackoverflow.com/questions/11639809/should-i-repeat-inclusions-in-cpp-and-h
The thread variable should not go out of scope while the thread is still running:
- Terminate called without an active exception
- https://stackoverflow.com/questions/13999432/stdthread-terminate-called-without-an-active-exception-dont-want-to-joi
- https://stackoverflow.com/questions/13263277/difference-between-stdsystem-clock-and-stdsteady-clock
- http://www.modernescpp.com/index.php/the-three-clocks
- Windows has a very bad interval resolution: https://stackoverflow.com/questions/16299029/resolution-of-stdchronohigh-resolution-clock-doesnt-correspond-to-measureme