does anyone know if grails 7 will support virtual ...
# questions
g
does anyone know if grails 7 will support virtual threads?
p
There isn't any plans for Virtual Threads as there is already enough on our plate. I will bring it up for discussion with the other team members. However, if someone from the community is willing to participate and help out, we are more than happy to include it with Grails 7.
f
Grails 7 will be Java 17 right? -- Java Virtual Threads is Java 21?
random: Is there any merit to mapping grails to Java? Like instead of Grails 7, Grails 17 (for java 17)
m
It's actually possible to run Grails 6 with virtual threads. Add this configuration and run with Java 21.
Copy code
@Configuration
class VirtualThreadConfig {

    @Bean
    TomcatProtocolHandlerCustomizer tomcatProtocolHandlerCustomizer() {
        return { protocolHandler ->
            protocolHandler.setExecutor(Executors.newVirtualThreadPerTaskExecutor())
        }
    }
}
👀 1
f
but its not supported right @mattias_reichel? Its like do at your own risk sorta thing?
Virutal threads are not production ready in Java 21 also?
m
@falling Maybe we mean different things in this case when we say support? Virtual threads are a feature of Java 21. They are supported in Tomcat 9. Grails 6 uses Tomcat 9.
👍 1
f
no I think you are right about them, I was mistaken. Will Grails 6 officially support Java 21?
m
Grails 6 requires at minimum Java 11. The JVM is normally backwards compatible. But, I do not think you would get official support with issues related to running Grails 6 on Java 21.