manage the quit_requested on MessageQueue
… that have infinite loop can quit when the quit_requested is set to true.