I believe that some of the reasons exit was implemented to finish its draw frame before quitting had to do with OpenGL crashes in P3D.
From the exit() reference page:
Rather than terminating immediately, exit() will cause the sketch to exit after draw() has completed (or after setup() completes if called during the setup() function). For Java programmers, this is not the same as System.exit(). Further, System.exit() should not be used because closing out an application while draw() is running may cause a crash (particularly with P3D). https://processing.org/reference/exit_.html
Returning draw() if you wish should work just fine.
Processing.py exit() works in the same was as Processing (Java), although jdf is considering changing it....
Answers
exit();
Thanks but that simply queues an exit for draw() completion. I want to exit without delay.
exit();
return;
That works! Can't imagine why exit() doesn't do that itself, but thanks!
I believe that some of the reasons exit was implemented to finish its draw frame before quitting had to do with OpenGL crashes in P3D.
From the
exit()
reference page:Returning
draw()
if you wish should work just fine.Processing.py exit() works in the same was as Processing (Java), although jdf is considering changing it....
That's the 'that' in my: "Can't imagine why exit() doesn't do that itself".
I've has one crash since using it but cause unknown.