X Tutup
Skip to content

Commit fe25a32

Browse files
author
Robert Engels
committed
use virtual thread executor
1 parent b0b76c3 commit fe25a32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/extras/SimpleFileServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public static void main(String[] args) throws Exception {
6060
String rootDir = args[0];
6161
int port = Integer.parseInt(args[1]);
6262
String logfile = args[2];
63-
HttpServer server = HttpServer.create(new InetSocketAddress(port), 0);
63+
HttpServer server = HttpServer.create(new InetSocketAddress(port), 200);
64+
server.setExecutor(Executors.newVirtualThreadPerTaskExecutor());
6465
HttpHandler h = new FileServerHandler(rootDir);
6566
HttpHandler h1 = new EchoHandler();
6667
HttpHandler h2 = new DevNullHandler();

0 commit comments

Comments
 (0)
X Tutup