improved javadoc
This commit is contained in:
parent
beacb948b1
commit
3ad8f627e7
|
@ -19,7 +19,6 @@
|
|||
package org.eclipse.jetty.util.thread;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
|
@ -154,22 +153,18 @@ public interface ExecutionStrategy
|
|||
}
|
||||
|
||||
/**
|
||||
* <p>A strategy where the caller thread produces a task, then arranges another
|
||||
* thread to continue production, and then runs the task.
|
||||
* <p>A strategy where the thread calls produce will always run the resulting task
|
||||
* itself. The strategy may dispatches another thread to continue production.
|
||||
* </p>
|
||||
* <p>The strategy is also known by the phrase 'eat what you kill', which comes from
|
||||
* <p>The strategy is also known by the nickname 'eat what you kill', which comes from
|
||||
* the hunting ethic that says a person should not kill anything he or she does not
|
||||
* plan on eating. It was taken up in its more general sense by lawyers, who used it
|
||||
* to mean that an individual’s earnings should be based on how much business that
|
||||
* person brings to the firm and the phrase is now quite common throughout the
|
||||
* business world.
|
||||
* </p>
|
||||
* <p>In this case, the phrase is used to mean that a thread should not produce a
|
||||
* task that it does not intend to run. By making producers run the task that they
|
||||
* have just produced avoids execution delays and avoids parallel slow down by running
|
||||
* the task in the same core, with good chances of having a hot CPU cache. It also
|
||||
* avoids the creation of a queue of produced tasks that the system does not yet have
|
||||
* capacity to consume, which can save memory and exert back pressure on producers.
|
||||
* plan on eating. In this case, the phrase is used to mean that a thread should
|
||||
* not produce a task that it does not intend to run. By making producers run the
|
||||
* task that they have just produced avoids execution delays and avoids parallel slow
|
||||
* down by running the task in the same core, with good chances of having a hot CPU
|
||||
* cache. It also avoids the creation of a queue of produced tasks that the system
|
||||
* does not yet have capacity to consume, which can save memory and exert back
|
||||
* pressure on producers.
|
||||
* </p>
|
||||
*/
|
||||
public static class ExecuteProduceRun implements ExecutionStrategy, Runnable
|
||||
|
|
Loading…
Reference in New Issue