-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty 12: Review SerializedInvoker.Link.getInvocationType() #10091
Labels
Comments
If we change the So we have 6 possible states when we offer a task (blocking or non_blocking (ignoring either for now)) to a serializer that is either empty, contains all non_blocking, or contains at least 1 blocking.
|
See also #11425 |
See also #12266 |
#12395 tackles this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
12
Description
SerializedInvoker.Link.getInvocationType()
currently returns hardcodedBLOCKING
.This is because a blocking task can be offered while a non-blocking one is running, so the thread running the non-blocking task may assume that the task currently running is non-blocking, but then executes a blocking one that was offered concurrently.
This strategy works, but assumes the worst case, which may result in unnecessary threads hand-overs, for example for HTTP/2
DATA
frames, where an application could pass a NON_BLOCKINGRunnable
toRequest.demand(Runnable)
.Review whether we can improve on this logic, possibly having the thread offering the blocking task wait until previous non-blocking tasks are run.
The text was updated successfully, but these errors were encountered: