When writing Spring REST services in Kotlin, would...
# spring
e
When writing Spring REST services in Kotlin, would controller functions be a typical and safe place to call
runBlocking { }
?
d
if you are using coroutines you probably should use WebFlux instead of MVC
which gives you nice interop between reactor and coroutines
so your controller functions can be suspendable
e
In my case, there is a large existing code base that is not feasible to mass-convert at this time, so I need to introduce Arrow-kt incrementally
Is it safe to call
runBlocking()
from the controller function?
d
as the name implies it will block
but since you are using MVC it is still blocking the threads so 🤷
so yeah it will work
e
OK …I am just trying to verify that I will not break anything
thanks