Don't let invoker units be posted after the invoker has been shutdown.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2290 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -136,6 +136,9 @@ public class Invoker extends LoopingThread
|
|||||||
*/
|
*/
|
||||||
public void postUnit (Unit unit)
|
public void postUnit (Unit unit)
|
||||||
{
|
{
|
||||||
|
if (!isRunning()) {
|
||||||
|
throw new IllegalStateException("Invoker has been shutdown");
|
||||||
|
}
|
||||||
// note the time
|
// note the time
|
||||||
unit.queueStamp = System.currentTimeMillis();
|
unit.queueStamp = System.currentTimeMillis();
|
||||||
// and append it to the queue
|
// and append it to the queue
|
||||||
|
|||||||
Reference in New Issue
Block a user