Fuckit. Executor all the way.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2674 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray.j.greenwell
2009-12-08 19:57:52 +00:00
parent 2c04b41b66
commit a6d64b1605
3 changed files with 2 additions and 22 deletions
@@ -132,14 +132,6 @@ public class Invoker extends LoopingThread
_defaultLongThreshold = millis; _defaultLongThreshold = millis;
} }
/**
* Creates an invoker that will post results to the supplied result receiver.
*/
public Invoker (String name, RunQueue resultReceiver)
{
this(name, new RunQueue.AsExecutor(resultReceiver));
}
/** /**
* Creates an invoker that will post results to the supplied result receiver. * Creates an invoker that will post results to the supplied result receiver.
*/ */
@@ -87,7 +87,7 @@ public class SerialExecutor
} }
/** /**
* Construct the SerialExecutor, using a the specified timeout for posted Runnables. * Construct the SerialExecutor, using the specified timeout for posted Runnables.
*/ */
public SerialExecutor (Executor receiver, long runnableTimeout) public SerialExecutor (Executor receiver, long runnableTimeout)
{ {
@@ -95,16 +95,6 @@ public class SerialExecutor
_runnableTimeout = runnableTimeout; _runnableTimeout = runnableTimeout;
} }
/**
* Construct the SerialExecutor.
* @deprecated
*/
@Deprecated
public SerialExecutor (RunQueue receiver)
{
this(new RunQueue.AsExecutor(receiver));
}
// from Executor // from Executor
public void execute (final Runnable command) public void execute (final Runnable command)
{ {
@@ -20,8 +20,6 @@
package com.samskivert.util.tests; package com.samskivert.util.tests;
import java.util.concurrent.Executor;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestCase; import junit.framework.TestCase;
@@ -44,7 +42,7 @@ public class SerialExecutorTest extends TestCase
@Override @Override
public void runTest () public void runTest ()
{ {
SerialExecutor executor = new SerialExecutor((Executor)this); SerialExecutor executor = new SerialExecutor(this);
int added = 0; int added = 0;
// _sleeps++, _exits++, _results++ // _sleeps++, _exits++, _results++