Skip to content

Refine PropagationContextElement #35469

@sdeleuze

Description

@sdeleuze

This enhancement intends to refine PropagationContextElement by:

  • Capturing the ThreadLocal when instantiating the PropagationContextElement in order to support dispatchers switching threads
  • Removing the constructor parameter which is not idiomatic and breaks the support when switching threads, and use instead the updateThreadContext(context: CoroutineContext) parameter
  • Making the kotlinx-coroutines-reactor dependency optional
  • Making the properties private
  • Documentation the recommended usage as Dispatchers.IO + PropagationContextElement()

cc @bclozel

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: kotlinAn issue related to Kotlin supporttype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions