[−][src]Function win_win::runloop
pub unsafe fn runloop(accel: HACCEL) -> BOOL
A basic winapi runloop.
This runloop blocks on receiving messages and dispatches them to windows. It exits
on WM_QUIT.
It is tempting to try to get fancier with runloops, for example waiting on semaphores
or other events, but these strategies are risky. In particular, the main runloop is not
always in control; when the window is being resized, or a modal dialog is open, then
that runloop takes precedence. For waking the UI thread from another thread,
SendMessage is probably the best bet.
Safety
The accel argument must be a valid HACCEL handle (though null_mut() is valid).