From 9bf52de99fd22d0089329103d8381b889a2b8aad Mon Sep 17 00:00:00 2001 From: mdb Date: Fri, 4 Apr 2008 17:29:39 +0000 Subject: [PATCH] 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 --- src/java/com/samskivert/util/Invoker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/java/com/samskivert/util/Invoker.java b/src/java/com/samskivert/util/Invoker.java index 487e868c..f0ad601c 100644 --- a/src/java/com/samskivert/util/Invoker.java +++ b/src/java/com/samskivert/util/Invoker.java @@ -136,6 +136,9 @@ public class Invoker extends LoopingThread */ public void postUnit (Unit unit) { + if (!isRunning()) { + throw new IllegalStateException("Invoker has been shutdown"); + } // note the time unit.queueStamp = System.currentTimeMillis(); // and append it to the queue