stop

fun stop()

Ends the event loop, which lets runEventLoop return.

stop alone is a request, not an exit: AppKit checks it only after it finishes handling an event, and a run loop with nothing to handle is asleep. Called from a playback thread when a file ends, that leaves a window sitting there until the viewer happens to move the mouse. The dummy event below is the wake-up, and posting one is safe from any thread.