Stops a modal event loop, allowing you to return a custom result code.
- macOS 10.0+
The result code you want returned from the
runmethod. The meaning of this result code is up to you.
This method should always be paired with a previous invocation of
run is stopped with this method, it returns the given
return. In macOS 10.9 and later, you can use this method to stop a
run loop outside of an event callback, such as from within a method repeatedly invoked by an
Timer object or a method running in a different thread.