diff --git a/src/java/com/samskivert/util/Invoker.java b/src/java/com/samskivert/util/Invoker.java index aee0e287..4f9cd9fa 100644 --- a/src/java/com/samskivert/util/Invoker.java +++ b/src/java/com/samskivert/util/Invoker.java @@ -22,6 +22,8 @@ package com.samskivert.util; import java.util.HashMap; +import java.util.concurrent.Executor; + import static com.samskivert.Log.log; /** @@ -40,7 +42,7 @@ import static com.samskivert.Log.log; * is desirable. */ public class Invoker extends LoopingThread - implements RunQueue + implements Executor, RunQueue { /** * The unit encapsulates a unit of executable code that will be run on the invoker thread. It @@ -164,6 +166,12 @@ public class Invoker extends LoopingThread return _queue.size(); } + // from Executor + public void execute (Runnable command) + { + postRunnable(command); + } + // from RunQueue public void postRunnable (final Runnable r) {