smallrye / smallrye-context-propagation

SmallRye implementation of MicroProfile Context Propagation
Apache License 2.0
30 stars 24 forks source link

Add sys property to control how to cleanup context's ThreadLocal (Fixes #424) #425

Open franz1981 opened 1 year ago

franz1981 commented 1 year ago

As explained in #424 this is added to control how to cleanup the context, but:

franz1981 commented 1 year ago

https://github.com/Sanne/quarkus/commit/75e2d7e4b22ae72c1fa4f1ae51779488843e0f21 is a PoC branch that show how that can be used

@geoand

geoand commented 1 year ago

I think it makes sense.

FroMage commented 1 year ago

This is only for the TL we use to override settings locally. I don't think most people use this API. If you want to clear the TL for libs (CDI, Security, Transaction) you need to do it in the respective ThreadLocalProvider implementations. Of which there are many, honestly I've lost track.

geoand commented 1 year ago

Yeah, we'll have to do the same in the providers we use in Quarkus

geoand commented 1 year ago

I am also wondering whether we should have a way to have Quarkus pass this to CP when it bootstraps it