diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java index 88e0392894a..4f68ad820c4 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java @@ -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 } /** - *

A strategy where the caller thread produces a task, then arranges another - * thread to continue production, and then runs the task. + *

A strategy where the thread calls produce will always run the resulting task + * itself. The strategy may dispatches another thread to continue production. *

- *

The strategy is also known by the phrase 'eat what you kill', which comes from + *

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. - *

- *

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. *

*/ public static class ExecuteProduceRun implements ExecutionStrategy, Runnable