update 使用springboot封装的虚拟线程池

2.X
疯狂的狮子Li 1 year ago
parent 15dfc2074a
commit 520abf2d4a

@ -26,7 +26,7 @@ public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServle
deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
// 使用虚拟线程 解除下方注释 仅限jdk21
// if (SpringUtils.isVirtual()) {
// ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
// VirtualThreadTaskExecutor executor = new VirtualThreadTaskExecutor("undertow-");
// deploymentInfo.setExecutor(executor);
// deploymentInfo.setAsyncExecutor(executor);
// }

Loading…
Cancel
Save