diff --git a/src/java/com/samskivert/util/Invoker.java b/src/java/com/samskivert/util/Invoker.java index 2416cb62..2a72f198 100644 --- a/src/java/com/samskivert/util/Invoker.java +++ b/src/java/com/samskivert/util/Invoker.java @@ -27,6 +27,7 @@ import com.samskivert.Log; * invoker is desirable. */ public class Invoker extends LoopingThread + implements RunQueue { /** * The unit encapsulates a unit of executable code that will be run on @@ -122,6 +123,23 @@ public class Invoker extends LoopingThread _queue.append(unit); } + // from RunQueue + public void postRunnable (final Runnable r) + { + postUnit(new Unit() { + public boolean invoke () { + r.run(); + return false; + } + }); + } + + // from RunQueue + public boolean isDispatchThread () + { + return (this == Thread.currentThread()); + } + // documentation inherited public void iterate () {