Skip to content

binder: don't block in checkAuthorizationForServiceAsync()#12872

Open
jdcormie wants to merge 2 commits into
grpc:masterfrom
jdcormie:concurrent-server-auth
Open

binder: don't block in checkAuthorizationForServiceAsync()#12872
jdcormie wants to merge 2 commits into
grpc:masterfrom
jdcormie:concurrent-server-auth

Conversation

@jdcormie

Copy link
Copy Markdown
Member

A method named xyzAsync() should not block. Potentially blocking
ServerSecurityPolicy work is now submit()ted to an offload Executor
instead, just like we do on the client. One small behavior change is
that the first call to every method now goes through the async path.

jdcormie added 2 commits June 18, 2026 16:46
This new server executor mirrors the ManagedChannelBuilder concept on
the client. We'll use it to run blocking SecurityPolicy checks in a
subsequent commit.

For backwards compatibility, we default to using the server's
executor() for this purpose, which is where blocking SecurityPolicy
checks are run today. This ensures that all the same work is done on the
same threads for existing servers.
A method named xyzAsync() should not block. Potentially blocking
ServerSecurityPolicy work is now submit()ted to an offload Executor, just
like we do on the client. One small behavior change is that the first
call to every method now goes through the async path.
@jdcormie

Copy link
Copy Markdown
Member Author

@mateusazis could you please review? (I can't assign this to you in the usual way for some reason)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant