Skip to content

BlockingTaskExecutor Question #5425

Answered by trustin
angela278 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! GrpcServiceBuilder.useBlockingTaskExecutor(true) doesn't add another BlockingTaskExecutor. It merely instructs GrpcService to invoke your service implementation from the BlockingTaskExecutor you specified in ServerBuilder.blockingTaskExecutor(..). By default, unlike grpc-java, GrpcService invokes your service implementation from an event loop thread. useBlockingTaskExecutor() changes this default behavior so that it works more like grpc-java.

Also where does the NUM_COMMON_BLOCKING_TASK_THREADS flag get factored in? Does the numThreads passed in builder.blockingTaskExecutor(numThreads) override it?

There is a common BlockingTaskExecutor instance provided by CommonPools.blockingTaskE…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@angela278
Comment options

Answer selected by angela278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5423 on January 30, 2024 01:52.