Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ public final class SdkAdvancedAsyncClientOption<T> extends ClientOption<T> {
* <li>You want more fine-grained control over the {@link ThreadPoolExecutor} used, such as configuring the pool size
* or sharing a single pool between multiple clients.
* <li>You want to add instrumentation (i.e., metrics) around how the {@link Executor} is used.
* <li>You know, for certain, that all of your {@link CompletableFuture} usage is strictly non-blocking, and you wish to
* remove the minor overhead incurred by using a separate thread. In this case, you can use
* {@code Runnable::run} to execute the future-completion directly from within the I/O thread.
* </ol>
* <b>Note</b>
* <p>
* We strongly recommend <strong>against</strong> using {@code Runnable::run}, which executes the future-completion directly from
* within the I/O thread because it may block the IO thread and cause deadlock, especially if you are sending
* another SDK request in the {@link CompletableFuture} chain since the SDK may perform blocking calls in some cases.
*/
public static final SdkAdvancedAsyncClientOption<Executor> FUTURE_COMPLETION_EXECUTOR =
new SdkAdvancedAsyncClientOption<>(Executor.class);
Expand Down