Skip to content
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

Execute gRPC request processing on duplicated contexts #23607

Merged

Conversation

cescoffier
Copy link
Member

No description provided.

@@ -32,13 +36,15 @@
public Uni<EmptyProtos.Empty> emptyCallBlocking(EmptyProtos.Empty request) {
assertThat(request).isNotNull();
assertRunOnWorker();
assertRunOnDuplicatedContext();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit surprised that not being on the event loop we still have a vertx context

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know it's confusing. But inside an "executeBlocking" block, you still have access to the same context as outside (leading to fun concurrency issue)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work for the root contexts too? Or only duplicated ones?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also works from the root context too, but more like a side effect of the implementation of the executeBlocking.
This is actually why, inside an executeBlocking block, if you ask vert.x is the context is an event loop context, it will return true (while you are not running on the event loop).

@cescoffier cescoffier force-pushed the grpc-server-duplicated-context branch from d773247 to aeec9af Compare February 11, 2022 14:57
@cescoffier cescoffier merged commit 1cca7d9 into quarkusio:main Feb 12, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 12, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.2.Final Feb 21, 2022
@cescoffier cescoffier deleted the grpc-server-duplicated-context branch March 15, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants