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