Fork me on GitHub
#pedestal
<
2023-09-23
>
Mark Wardle07:09:43

Is there an easy way to switch Jetty to using virtual threads when using Pedestal and running on Java that supports them?

Mark Wardle07:09:24

eg. are there any 'hooks' I can use to potentially configure the thread pool used internally?

jmv19:09:43

Have you tried passing in a custom :thread-pool? http://pedestal.io/reference/jetty

👍 1
Mark Wardle20:09:34

Thanks! I didn’t spot that page in the docs! Perfect. I’ll try and do some benchmarking!

jmv20:09:37

Report back! Very curious to see the results.

👍 1
Mark Wardle08:09:12

Not sure this works as jetty 9's QueuedThreadPool doesn't support setting an executor service. Direct use of e.g. Jetty 11 via ring jetty adaptor has that hook.