MCPcopy Index your code
hub / github.com/processing/processing / exit

Method exit

core/src/processing/core/PApplet.java:3775–3796  ·  view source on GitHub ↗

( begin auto-generated from exit.xml ) Quits/stops/exits the program. Programs without a draw() function exit automatically after the last line has run, but programs with draw() run continuously until the program is manually stopped or exit() is run. Rather than te

()

Source from the content-addressed store, hash-verified

3773 * @webref structure
3774 */
3775 public void exit() {
3776 if (surface.isStopped()) {
3777 // exit immediately, dispose() has already been called,
3778 // meaning that the main thread has long since exited
3779 exitActual();
3780
3781 } else if (looping) {
3782 // dispose() will be called as the thread exits
3783 finished = true;
3784 // tell the code to call exitActual() to do a System.exit()
3785 // once the next draw() has completed
3786 exitCalled = true;
3787
3788 } else if (!looping) {
3789 // if not looping, shut down things explicitly,
3790 // because the main thread will be sleeping
3791 dispose();
3792
3793 // now get out
3794 exitActual();
3795 }
3796 }
3797
3798
3799 public boolean exitCalled() {

Callers 15

handleKeyEventMethod · 0.95
windowDestroyNotifyMethod · 0.80
windowDestroyedMethod · 0.80
nativeMouseEventMethod · 0.80
handleDrawMethod · 0.80
exitActualMethod · 0.80
runSketchMethod · 0.80
handleQuitRequestWithMethod · 0.80
handleMethod · 0.80
windowClosingMethod · 0.80
mousePressedMethod · 0.80
showErrorMethod · 0.80

Calls 3

exitActualMethod · 0.95
disposeMethod · 0.95
isStoppedMethod · 0.65

Tested by

no test coverage detected