Chronicle-Core icon indicating copy to clipboard operation
Chronicle-Core copied to clipboard

Deprecate ThreadLocalHelper.getTL(), add WeakThreadLocal

Open alamar opened this issue 3 years ago • 0 comments

Currently, the ThreadLocalHelper.getTL(tl, lambda) encourages the passing of method reference/lambda created on the spot, which creates garbage. We should perhaps introduce a WeakThreadLocal class which will accept a supplier in the constructor, and also make reference type configurable (in some cases, soft reference may be preferable)

alamar avatar Mar 18 '22 11:03 alamar