Allow a cleaner terminate of application
Allow a cleaner terminate by polling (not ideal) the done-variable every 100ms instead of only when an event comes in. This changes the events_loop function to do a select() with a 100ms timeout.
Edited by folkertvanheusden