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

Update documentation for FUTURE_COMPLETION_EXECUTOR #4950

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Changes from all commits
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>WARNING</b>
* <p>
* We strongly <strong>discourage</strong> using {@code Runnable::run}, which executes the future-completion directly from
* within the I/O thread because it may block the I/O 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
Loading