pub fn quit_now(exit_code: i32)Expand description
Causes the message loop to quit as soon as possible.
Can be used in case of exceptional errors. Note that this function doesn’t have the never return type (!).
The function saves the exit code in thread-local storage and posts a message. The very next message that the message loop retrieves will then be changed to a WM_QUIT message with that exit code, which causes the loop to return.