MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / exit

Method exit

src/main/java/field/app/RunLoop.java:311–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309
310 public void exit() {
311 try {
312 if (exitStarted.compareAndSet(false, true)) {
313 for (Runnable r : onExit) {
314 try {
315 r.run();
316 } catch (Throwable t) {
317 System.err.println(" exception thrown during exit (will continue on regardless)");
318 t.printStackTrace();
319 }
320 }
321 if (Thread.currentThread() != shutdownThread) System.exit(0);
322 }
323 } catch (Throwable t) {
324 System.err.println(" unexpected exception thrown during exit ");
325 t.printStackTrace();
326 }
327 }
328
329 /**
330 * adds a Runnable to be executed on exit. This will run before anything else that's been added.
331 */

Callers 6

RunLoopMethod · 0.95
nFunction · 0.45
run.jsFile · 0.45
upload-release.jsFile · 0.45
stateHasChangedMethod · 0.45
performMethod · 0.45

Calls 2

runMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected