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

api: Document that NameResolvers shouldn't block #8398

Merged
merged 1 commit into from Aug 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion api/src/main/java/io/grpc/NameResolver.java
Expand Up @@ -50,7 +50,9 @@
* <p>Implementations <strong>don't need to be thread-safe</strong>. All methods are guaranteed to
* be called sequentially. Additionally, all methods that have side-effects, i.e.,
* {@link #start(Listener2)}, {@link #shutdown} and {@link #refresh} are called from the same
* {@link SynchronizationContext} as returned by {@link Args#getSynchronizationContext}.
* {@link SynchronizationContext} as returned by {@link Args#getSynchronizationContext}. <strong>Do
* not block</strong> within the synchronization context; blocking I/O and time-consuming tasks
* should be offloaded to a separate thread, generally {@link Args#getOffloadExecutor}.
ejona86 marked this conversation as resolved.
Show resolved Hide resolved
*
* @since 1.0.0
*/
Expand Down