Skip to content
Draft
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 @@ -30,7 +30,11 @@ public static void setPropagateContextForTestingInDispatcher(
OkHttpUtil.propagateContextForTestingInDispatcher = propagateContextForTestingInDispatcher;
}

/** Returns a {@link Dispatcher} using daemon threads, otherwise matching the OkHttp default. */
/**
* Returns a {@link Dispatcher} using daemon threads, with both the maximum number of concurrent
* requests and the maximum size of the backing thread pool bounded to {@code
* max(availableProcessors, 5)}, matching the bound used by {@code JdkHttpSender}.
*/
public static Dispatcher newDispatcher() {
int maxRequests = Math.max(Runtime.getRuntime().availableProcessors(), 5);
Dispatcher dispatcher =
Expand Down
Loading