Skip to content

This is a ThreadLocal which does not leak class loader of your web application but still preserves a full non-blocking access (get, set and initialize) to your thread local values

License

codesinthedark/ImprovedThreadLocal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

ImprovedThreadLocal

This is a ThreadLocal compatible class that does not leak class loaders when you redeploy your web application. It is completely non-blocking so you will not have thread contention while reading, setting or initializing threadLocal values.

  • compatible with ThreadLocal
  • thread-pool friendly - it will not leak memory and class-loaders when application is stopped or thread removed from the pool
  • absolutely no thread contention (no synchronization or locks for accessing, initializing or removing thread local values)
  • same memory usage as ThreadLocal (improvement over VicariousThreadLocal class and other non-blocking classes that uses twice as much memory)
  • short and simple implementation

About

This is a ThreadLocal which does not leak class loader of your web application but still preserves a full non-blocking access (get, set and initialize) to your thread local values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages