wlstks7 / interactive-spaces

Automatically exported from code.google.com/p/interactive-spaces
Other
0 stars 0 forks source link

Controller cannot shutdown if IS thread is still running #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In a native IS python app, create an infinite loop in the function 
onNewInputJson(...)
2. Deploy and start the app.  Make sure the onNewInputJson(...) function gets 
called by sending a message to that live activity
3. Now that the onNewInputJson(...) is in an infinite loop, try shutting down 
the controller from the IS web admin

What is the expected output? What do you see instead?
Expected behavior: Controller stops the thread and shuts down.  Instead, the 
controller will never shut down unless you kill the process.

What version of the product are you using? On what operating system?
1.2.0 on OS X 10.7

Please provide any additional information below.

Original issue reported on code.google.com by zackb...@gmail.com on 28 Aug 2012 at 3:59

GoogleCodeExporter commented 9 years ago
This is unfortunately the way that Java threads work. They cannot just be 
arbitrarily killed like a process in an OS.

If you have threads you think can get into this state, check 
Thread.interrupted() to see if the loop should continue.

Original comment by khug...@google.com on 21 Dec 2012 at 6:58