Skip to content
Prev Previous commit
Next Next commit
s
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
brunoborges and Copilot authored Apr 7, 2026
commit fef1833066f230c874ba235fb785d6f50829df13
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ static Thread newThread(Runnable runnable, String name) {
}

/**
* Creates a virtual-thread-per-task executor for the JSON-RPC reader loop.
* Creates a single-thread executor backed by a virtual-thread factory for the
* JSON-RPC reader loop.
*
* @param name
* the thread name prefix for debuggability
* @return a virtual-thread {@link ExecutorService}
* the thread name for debuggability
* @return a single-thread virtual-thread-backed {@link ExecutorService}
*/
static ExecutorService newSingleThreadExecutor(String name) {
return Executors.newThreadPerTaskExecutor(Thread.ofVirtual().name(name).factory());
return Executors.newSingleThreadExecutor(Thread.ofVirtual().name(name).factory());
}

/**
Expand Down
Loading