This commit apply several refinements to PropagationContextElement: - Capture the ThreadLocal when instantiating the PropagationContextElement in order to support dispatchers switching threads - Remove the constructor parameter which is not idiomatic and breaks the support when switching threads, and use instead the updateThreadContext(context: CoroutineContext) parameter - Make the kotlinx-coroutines-reactor dependency optional - Make the properties private The Javadoc and tests are also updated to use the `Dispatchers.IO + PropagationContextElement()` pattern performed outside of the suspending lambda, which is the typical use case. Closes gh-35469 |
||
---|---|---|
.. | ||
annotations.adoc | ||
bean-definition-dsl.adoc | ||
classes-interfaces.adoc | ||
coroutines.adoc | ||
extensions.adoc | ||
getting-started.adoc | ||
null-safety.adoc | ||
requirements.adoc | ||
resources.adoc | ||
spring-projects-in.adoc | ||
web.adoc |