Skip to content

Commit 08b1d03

Browse files
committed
Switch to bounded elastic default scheduler.
Resolves: modelcontextprotocol#414, modelcontextprotocol#158 Replaces modelcontextprotocol#353 Signed-off-by: Christian Tzolov <[email protected]>
1 parent b6d132b commit 08b1d03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mcp/src/main/java/io/modelcontextprotocol/util/KeepAliveScheduler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void shutdown() {
141141
*/
142142
public static class Builder {
143143

144-
private Scheduler scheduler = Schedulers.single();
144+
private Scheduler scheduler = Schedulers.boundedElastic();
145145

146146
private Duration initialDelay = Duration.ofSeconds(0);
147147

@@ -162,9 +162,9 @@ public static class Builder {
162162
* Sets the scheduler to use for executing keepAlive calls.
163163
* @param scheduler The scheduler to use:
164164
* <ul>
165-
* <li>Schedulers.single() - single-threaded scheduler (Default)</li>
166-
* <li>Schedulers.boundedElastic() - bounded elastic scheduler for I/O
167-
* operations</li>
165+
* <li>Schedulers.single() - single-threaded scheduler</li>
166+
* <li>Schedulers.boundedElastic() - bounded elastic scheduler for I/O operations
167+
* (Default)</li>
168168
* <li>Schedulers.parallel() - parallel scheduler for CPU-intensive
169169
* operations</li>
170170
* <li>Schedulers.immediate() - immediate scheduler for synchronous execution</li>

0 commit comments

Comments
 (0)