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:
@@ -27,6 +27,7 @@ import com.samskivert.Log;
|
|||||||
* invoker is desirable.
|
* invoker is desirable.
|
||||||
*/
|
*/
|
||||||
public class Invoker extends LoopingThread
|
public class Invoker extends LoopingThread
|
||||||
|
implements RunQueue
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The unit encapsulates a unit of executable code that will be run on
|
* 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);
|
_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
|
// documentation inherited
|
||||||
public void iterate ()
|
public void iterate ()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user