Class ProduceConsume
java.lang.Object
org.eclipse.jetty.util.thread.strategy.ProduceConsume
- All Implemented Interfaces:
Runnable, ExecutionStrategy
A strategy where the caller thread iterates over task production, submitting each
task to an Executor for execution.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ExecutionStrategy
ExecutionStrategy.Producer -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ProduceConsume
-
-
Method Details
-
produce
public void produce()Description copied from interface:ExecutionStrategyInitiates (or resumes) the task production and consumption.
The produced task may be run by the same thread that called this method.
- Specified by:
producein interfaceExecutionStrategy- See Also:
-
dispatch
public void dispatch()Description copied from interface:ExecutionStrategyInitiates (or resumes) the task production and consumption.
This method guarantees that the task is never run by the thread that called this method.
- Specified by:
dispatchin interfaceExecutionStrategy- See Also:
-
run
-