aerospike / aerospike-client-java

Aerospike Java Client Library
Other
236 stars 212 forks source link

Enhance ThreadLocal initialization #140

Closed Aloren closed 5 years ago

Aloren commented 5 years ago

Use withInitial methods added in Java 1.8

BrianNichols commented 5 years ago

I'm inclined to keep the original code. The new code may have a cleaner syntax, but it does have an overhead (albeit very minor) of an extra method call (supplier.get() in SuppliedThreadLocal.initialValue()).