Generalize inter-thread context propagation #23876
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: superseded
An issue that has been superseded by another
Hello!
While working on asynchronous retry support in spring-retry, we encountered a scenario, where some thread-fixed context should be propagated from a scheduler thread (that calls
executor.execute(...)
) to the worker thread (that actually executes the runnable).We found the same pattern implemented in
org.springframework.security.concurrent
package of spring-security forSecurityContext
: https://github.com/spring-projects/spring-security/tree/master/core/src/main/java/org/springframework/security/concurrentThe idea of the issue is to generalize this mechanics: extract common part to spring-core and use it for
SecurityContext
in spring-security, and forRetryContext
in spring-retry.Here is a prototype of an implementation: ashamukov/spring-security#1
What do you think?
Thanks
cc: @rwinch
The text was updated successfully, but these errors were encountered: