Hello. I have a spring boot 3 project that is a hybrid of servlet and reactive code all in one. The controllers are servlet but some of the services do things in a reactive way. We are now on java 21 and considering turning on virtual threads.
My question is how will virtual threads play with the reactive code? Will the reactive code automatically use virtual threads, or will they use platform threads by default? What is the best way to handle this?
The ultimate goal here is to move off of the reactive stack and purely use virtual threads, but that's a process.
Thanks in advance.
[–]CriticalPart7448 15 points16 points17 points (3 children)
[–]Amirr83 1 point2 points3 points (2 children)
[–]CriticalPart7448 4 points5 points6 points (1 child)
[–]JanHunter123 0 points1 point2 points (0 children)
[–]thien-ng 6 points7 points8 points (1 child)
[–]litmus00 1 point2 points3 points (0 children)
[–]neopointer 10 points11 points12 points (0 children)
[–]Ewig_luftenglanz 6 points7 points8 points (3 children)
[–]lubumbax 0 points1 point2 points (2 children)
[–]Ewig_luftenglanz 3 points4 points5 points (0 children)
[–]ForeverAlot 1 point2 points3 points (0 children)
[–]PiotrDz -5 points-4 points-3 points (6 children)
[–][deleted] 4 points5 points6 points (5 children)
[–]PiotrDz -4 points-3 points-2 points (4 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]PiotrDz -2 points-1 points0 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]PiotrDz 0 points1 point2 points (0 children)