Update the javadocs on FastThreadLocal (#10942)
Motivation: The writing was unclear. Modification: Clarified the documentation. Result: No more ambiguity about what FTL.remove() does. Fixes #10914
This commit is contained in:
parent
5b699b722c
commit
bba0017d6e
@ -208,7 +208,7 @@ public class FastThreadLocal<V> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return see {@link InternalThreadLocalMap#setIndexedVariable(int, Object)}.
|
||||
* @see InternalThreadLocalMap#setIndexedVariable(int, Object).
|
||||
*/
|
||||
private void setKnownNotUnset(InternalThreadLocalMap threadLocalMap, V value) {
|
||||
if (threadLocalMap.setIndexedVariable(index, value)) {
|
||||
@ -231,15 +231,16 @@ public class FastThreadLocal<V> {
|
||||
return threadLocalMap != null && threadLocalMap.isIndexedVariableSet(index);
|
||||
}
|
||||
/**
|
||||
* Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue().
|
||||
* Sets the value to uninitialized for the specified thread local map.
|
||||
* After this, any subsequent call to get() will trigger a new call to initialValue().
|
||||
*/
|
||||
public final void remove() {
|
||||
remove(InternalThreadLocalMap.getIfSet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value to uninitialized for the specified thread local map;
|
||||
* a proceeding call to get() will trigger a call to initialValue().
|
||||
* Sets the value to uninitialized for the specified thread local map.
|
||||
* After this, any subsequent call to get() will trigger a new call to initialValue().
|
||||
* The specified thread local map must be for the current thread.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Loading…
Reference in New Issue
Block a user