Yes, I’d recommend 24+. May as well go all the way to 25 for LTS. I’m a little suspicious of ScopedValue, but 25 has it.
The prototype assumes loom so yes JDK 21 requirement is no issue - which means either a separate library, or some methodhandle based detection if it lands in stdlib
TBF, if you plan to use structured concurrency, you must target JDK 25, since the SDK is entirely different from the one in JDK 21 and 24.
So, if you don’t want to start with a brand new library with a lot of technical debt, JDK 25 is the right choice.
It’s still preview in 25. If you don’t want to start with debt, or --enable-preview, you have to wait longer; probably for 27.
I guess a key question is should it be 1:1 with javas virtual threads and structured concurrency API, or at least provide some kind of interop (either seamless or explicit) for calling java APIs that do use the JDKs structured concurrency API - same for the threadlocal/scopedvalue equivalent
What’s the timeline for these plans? I’m thinking since we’ve just recently bumped the requirements to JVM 17, it might be a little disruptive to again bump the requirements to 21 or 25 in a short timespan.
its not necessarily going to go into scala-library jar