SLING-7447 - Race condition in ThreadLocalCleaner initialization code

Ensure that the reflection-obtained class fields are initialized eagerly
when the class is loaded. Since the class will be accessed only when the
thread pool is instantiated, the performance impact is minimal.
Moreover, this saves a synchronized check for each Runnable execution.
The gains are minimal, but there is less mutable state to reason about.
1 file changed
tree: 674f9af526da3f50c8c42df3df1af007ab527d4f
  1. src/
  2. .gitignore
  3. LICENSE
  4. pom.xml
  5. README.md
README.md

Apache Sling Thread Support

This module is part of the Apache Sling project.

Support for thread handling like pooling.