If we had a kind of mir_main_loop_wait() function, which waits for events then that would be triply useful:
1. We could use it to do event handling without callbacks, and with thread-safety guaranteed; and
2. We could use it as a launching point to call the callback in the correct (main) thread; and
3. We could eliminate the ugly sleep() calls in our demo clients.
If we had a kind of mir_main_ loop_wait( ) function, which waits for events then that would be triply useful:
1. We could use it to do event handling without callbacks, and with thread-safety guaranteed; and
2. We could use it as a launching point to call the callback in the correct (main) thread; and
3. We could eliminate the ugly sleep() calls in our demo clients.