api: Document that NameResolvers shouldn't block

Fixes #8190
This commit is contained in:
Eric Anderson 2021-08-09 16:06:44 -07:00
parent bb06739cd7
commit 51d1484c3c
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ import javax.annotation.concurrent.ThreadSafe;
* <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}.
*
* @since 1.0.0
*/