Made the Invoker a RunQueue. Don't get confused!

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2123 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2007-07-09 20:20:47 +00:00
parent 1894f266a1
commit d47927b749
+18
View File
@@ -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 ()
{