konrad-kaminski / spring-kotlin-coroutine

Kotlin coroutine support for Spring.
449 stars 68 forks source link

Handling Spring ThreadLocal use #26

Open mgrzeszczak opened 6 years ago

mgrzeszczak commented 6 years ago

How does using coroutines pair with ThreadLocal variables used in Spring? Transactionality, security, MDC etc? What is the best approach to deal with that?

sdeleuze commented 6 years ago

I would be interested to hear @konrad-kaminski thoughts on this as well.

IMO Coroutines main advantage is to allow leveraging a Reactive/Async core via imperative programming. That's why I focus on WebFlux support as part of spring-fu experiment and bridging Coroutines context with Reactor context. That should allow us to take advantage of security and upcoming transactional Reactive support.