Closed cowtowncoder closed 1 year ago
Actually, I forgot what ThreadLocal
is used for here: it is not for Object recycling but for "AOP" style injection of modifiers.
Hence cannot be simply replaced -- if changes needed, need to think through using something else.
Similar to https://github.com/FasterXML/jackson-dataformats-binary/issues/399 (and others) (based on changes for https://github.com/FasterXML/jackson-core/issues/1089) we need to allow re-configuring of recyclers used for recycling
ObjectReaderModifier
/ObjectWriterModifier
instances: mostly for new Project Loom (whereThreadLocal
based approach won't work well) but also allow users to use more optimal pooling in general.Ideally changes would go in 2.16, leaving default impl in use but allowing re-configuration.