-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executor service fixes #3307
Executor service fixes #3307
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,15 +82,19 @@ protected void afterExecute(Runnable t, Throwable e) { | |
private final ThreadObserverHelper _observerHelper; | ||
} | ||
|
||
// The thead pool executor uses an unbounded queue. The tasks would wait in the queue until a | ||
// core pool thread is available to run it and the value of the maximumPoolSize therefore | ||
// doesn't have any effect. | ||
private static class QueueExecutor extends java.util.concurrent.ThreadPoolExecutor { | ||
QueueExecutor(Properties props, String threadName) { | ||
super( | ||
1, | ||
1, | ||
0, | ||
10, | ||
10, | ||
1000, | ||
Comment on lines
+91
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do these magic numbers refer to? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so the |
||
TimeUnit.MILLISECONDS, | ||
new java.util.concurrent.LinkedBlockingQueue<Runnable>(), | ||
Util.createThreadFactory(props, threadName)); | ||
allowCoreThreadTimeOut(true); | ||
_observerHelper = new ThreadObserverHelper(threadName); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is not clear.
Presumably, maximumPoolSize has not effect because the executor uses an unbounded queue? As written, it sounds like a consequence of the wait?
It's also not clear to me what this means / add:
This is not obvious?