We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Stopping the Draw thread
Page Index Toggle Pages: 1
Stopping the Draw thread (Read 616 times)
Stopping the Draw thread
Dec 9th, 2005, 1:00pm
 
Hello,
I have a fat client java application which uses processing in the presentation layer. The AWT thread forks out a java user thread which is responsible for querying database and retrieving data which is drawn on the UI.
I have made both these threads part of the same thread group.
when there is an exception in the data access thread i want to handle the xception and exit the JVM. Before exiting i want to interrupt / stop all threads.
I cannot seem to be able to stop the AWT thread which is an loop calling draw(). I have tried ThreadGroup.interrupt()

Is there any way i could stop this thread?

thank you
Sameer
Re: Stopping the Draw thread
Reply #1 - Dec 9th, 2005, 5:54pm
 
you can call noLoop() which will stop updating the ui (see the reference).

or you can call stop(), which will mark the p5 thread as finished so that it exits.
Page Index Toggle Pages: 1