-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add support of @RunOnVirtualThread on class for websockets next #44925
Add support of @RunOnVirtualThread on class for websockets next #44925
Conversation
5a9d85e
to
6e9ee38
Compare
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.
Looks good but we'll need to update the docs as well: https://github.com/quarkusio/quarkus/blob/main/docs/src/main/asciidoc/websockets-next-reference.adoc?plain=1#L233-L251
This comment has been minimized.
This comment has been minimized.
@mkouba I was wondering also, if it should fail if the annoted Class contains non-blocking methods ? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🙈 The PR is closed and the preview is expired. |
Hm, we don't have this validation at the moment. I mean you can annotate a method that returns |
@@ -240,6 +240,7 @@ WebSocket Next supports _blocking_ and _non-blocking_ logic, akin to Quarkus RES | |||
Here are the rules governing execution: | |||
|
|||
* Methods annotated with `@RunOnVirtualThread`, `@Blocking` or `@Transactional` are considered blocking. | |||
* All Methods in a class annotated with `@RunOnVirtualThread` are considered blocking and run on a virtual thread. |
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.
* All Methods in a class annotated with `@RunOnVirtualThread` are considered blocking and run on a virtual thread. | |
* Methods declated on a class annotated with `@RunOnVirtualThread` are considered blocking. |
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.
We should also update the bullet about Kotlin suspend
functions...
Plus change the last bullet from "Methods annotated with @RunOnVirtualThread
must execute on a virtual thread, each invocation spawns a new virtual thread." to something like "Methods annotated with @RunOnVirtualThread
or declared on a class annotated with @RunOnVirtualThread
must be executed on a virtual thread, each invocation spawns a new virtual thread."
4e9f7c6
to
5c4ec9f
Compare
5c4ec9f
to
890c787
Compare
Status for workflow
|
Status for workflow
|
@Malandril merged, thanks for your contribution! |
This PR allows to configure the virtual thread execution model of the websockets next endpoints on the class with
@RunOnVirtualThread
.