Skip to content

Commit fef1833

Browse files
brunoborgesCopilot
andauthored
s
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 25829a4 commit fef1833

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java21/com/github/copilot/sdk/ThreadFactoryProvider.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ static Thread newThread(Runnable runnable, String name) {
3939
}
4040

4141
/**
42-
* Creates a virtual-thread-per-task executor for the JSON-RPC reader loop.
42+
* Creates a single-thread executor backed by a virtual-thread factory for the
43+
* JSON-RPC reader loop.
4344
*
4445
* @param name
45-
* the thread name prefix for debuggability
46-
* @return a virtual-thread {@link ExecutorService}
46+
* the thread name for debuggability
47+
* @return a single-thread virtual-thread-backed {@link ExecutorService}
4748
*/
4849
static ExecutorService newSingleThreadExecutor(String name) {
49-
return Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name(name).factory());
50+
return Executors.newSingleThreadExecutor(Thread.ofVirtual().name(name).factory());
5051
}
5152

5253
/**

0 commit comments

Comments
 (0)