renamed EatWhatYouKill to ExecuteProduceConsume
This commit is contained in:
parent
8b41de3cb5
commit
23216076a9
|
@ -24,7 +24,7 @@ import java.util.concurrent.Executor;
|
|||
import org.eclipse.jetty.util.Loader;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.thread.strategy.ExecuteProduceRun;
|
||||
import org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume;
|
||||
|
||||
/**
|
||||
* <p>An {@link ExecutionStrategy} executes {@link Runnable} tasks produced by a {@link Producer}.
|
||||
|
@ -94,7 +94,7 @@ public interface ExecutionStrategy
|
|||
}
|
||||
}
|
||||
|
||||
return new ExecuteProduceRun(producer,executor);
|
||||
return new ExecuteProduceConsume(producer,executor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ import org.eclipse.jetty.util.thread.SpinLock.Lock;
|
|||
* pressure on producers.
|
||||
* </p>
|
||||
*/
|
||||
public class ExecuteProduceRun implements ExecutionStrategy, Runnable
|
||||
public class ExecuteProduceConsume implements ExecutionStrategy, Runnable
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ExecuteProduceRun.class);
|
||||
private static final Logger LOG = Log.getLogger(ExecuteProduceConsume.class);
|
||||
private final SpinLock _lock = new SpinLock();
|
||||
private final Runnable _runExecute = new RunExecute();
|
||||
private final Producer _producer;
|
||||
|
@ -53,7 +53,7 @@ public class ExecuteProduceRun implements ExecutionStrategy, Runnable
|
|||
private boolean _producing;
|
||||
private boolean _pending;
|
||||
|
||||
public ExecuteProduceRun(Producer producer, Executor executor)
|
||||
public ExecuteProduceConsume(Producer producer, Executor executor)
|
||||
{
|
||||
this._producer = producer;
|
||||
this._executor = executor;
|
|
@ -26,12 +26,12 @@ import org.eclipse.jetty.util.thread.ExecutionStrategy;
|
|||
* <p>A strategy where the caller thread iterates over task production, submitting each
|
||||
* task to an {@link Executor} for execution.</p>
|
||||
*/
|
||||
public class ProduceRun implements ExecutionStrategy, Runnable
|
||||
public class ProduceConsume implements ExecutionStrategy, Runnable
|
||||
{
|
||||
private final Producer _producer;
|
||||
private final Executor _executor;
|
||||
|
||||
public ProduceRun(Producer producer, Executor executor)
|
||||
public ProduceConsume(Producer producer, Executor executor)
|
||||
{
|
||||
this._producer = producer;
|
||||
this._executor = executor;
|
|
@ -28,13 +28,13 @@ import org.eclipse.jetty.util.thread.ExecutionStrategy;
|
|||
* <p>A strategy where the caller thread iterates over task production, submitting each
|
||||
* task to an {@link Executor} for execution.</p>
|
||||
*/
|
||||
public class ProduceExecuteRun implements ExecutionStrategy
|
||||
public class ProduceExecuteConsume implements ExecutionStrategy
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ExecutionStrategy.class);
|
||||
private final Producer _producer;
|
||||
private final Executor _executor;
|
||||
|
||||
public ProduceExecuteRun(Producer producer, Executor executor)
|
||||
public ProduceExecuteConsume(Producer producer, Executor executor)
|
||||
{
|
||||
this._producer = producer;
|
||||
this._executor = executor;
|
|
@ -47,7 +47,7 @@ public class ExecuteProduceRunTest
|
|||
};
|
||||
|
||||
|
||||
ExecuteProduceRun _ewyk;
|
||||
ExecuteProduceConsume _ewyk;
|
||||
final BlockingQueue<Runnable> _produce = new BlockingArrayQueue<>();
|
||||
final Queue<Runnable> _executions = new ConcurrentArrayQueue<>();
|
||||
volatile Thread _producer;
|
||||
|
@ -91,7 +91,7 @@ public class ExecuteProduceRunTest
|
|||
}
|
||||
};
|
||||
|
||||
_ewyk = new ExecuteProduceRun(producer,executor);
|
||||
_ewyk = new ExecuteProduceConsume(producer,executor);
|
||||
}
|
||||
|
||||
@After
|
||||
|
|
Loading…
Reference in New Issue