From a8e2c5001ad317493cf15b25c661054943ac1370 Mon Sep 17 00:00:00 2001 From: tipsy Date: Wed, 6 Dec 2023 04:26:14 +0100 Subject: [PATCH] add migration guide for virtual threads --- pages/docs/migration-guide-5-6.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/docs/migration-guide-5-6.md b/pages/docs/migration-guide-5-6.md index 587241a..7dab8a4 100644 --- a/pages/docs/migration-guide-5-6.md +++ b/pages/docs/migration-guide-5-6.md @@ -88,6 +88,13 @@ app.beforeMatched { ctx -> {% endcapture %} {% include macros/docsSnippet.html java=java kotlin=kotlin %} +## Virtual threads are now opt-in +In Javalin 5, virtual threads were enabled by default. This was because virtual threads themselves +were opt-in, and we wanted to make it as easy as possible to try them out. Now that virtual threads +are becoming part of the official JDKs, we have decided to make them opt-in. You can enable virtual +threads by setting `config.useVirtualThreads = true`. This will enable virtual threads for +all Javalin threads, including the Jetty request threads. + ## Untyped "app attributes" are now typed "app data" In Javalin 5, you could attach and access untyped attributes to the Javalin instance, like this: