com.sun.net.httpserver update

Kasper Nielsen kasperni at gmail.com
Mon Sep 21 11:31:49 UTC 2020


> >
> Thanks for confirming that it works although I'm not quite sure what you
> mean by "1000 extra threads per request".

I just did some variants of this in the request processing code:

try (ExecutorService executor = Executors.newVirtualThreadExecutor()) {
  for (int i = 0; i < 100; i++) {
    executor.submit(() -> {Thread.sleep(20);return null;});
  }
}

/Kasper


More information about the loom-dev mailing list