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
Improve ReservedThreadExecutor dump #6652
Labels
Comments
sbordet
added a commit
that referenced
this issue
Aug 23, 2021
Now adding/removing ReservedThread instances to _threads only in reservedWait(). In this way the window of time in which they can be caught for a dump() is shorter, producing more accurate dumps. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet
added a commit
that referenced
this issue
Aug 23, 2021
Fixed test failing due to the changes in toString(). Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet
added a commit
that referenced
this issue
Aug 24, 2021
Incorporate suggestions from review. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet
added a commit
that referenced
this issue
Aug 24, 2021
Updated doStop() to interrupt non-null threads. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet
added a commit
that referenced
this issue
Aug 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Target Jetty version(s)
9.4.x
Enhancement Description
ReservedThreadExecutor.dump()
can yield un-intuitive output; for example with capacity 1, this may happen:which is un-intuitive because there are 3 threads when the capacity is 1.
The state of
ReservedThreadExecutor
is correct because there is only 1 thread that isRESERVED
.One is
RUNNING
and the onePENDING
will be checked against the capacity and returned to the pool -- it was "caught" by the dump in a transient moment.The text was updated successfully, but these errors were encountered: