Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong the comment for the remove method on FastThreadLocal class. #10914

Closed
andrewvo148 opened this issue Jan 8, 2021 · 4 comments · Fixed by #10942
Closed

Wrong the comment for the remove method on FastThreadLocal class. #10914

andrewvo148 opened this issue Jan 8, 2021 · 4 comments · Fixed by #10942

Comments

@andrewvo148
Copy link
Contributor

* Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue().

@chrisvest
Copy link
Contributor

What's wrong about it?

@andrewvo148
Copy link
Contributor Author

andrewvo148 commented Jan 8, 2021

/** * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); }

@chrisvest,
The remove() method call to getIfSet() not call to get().

@chrisvest
Copy link
Contributor

What it's meant to say is that after you've called remove(), if you then call get(), you'll get a new initialValue() out.

@andrewvo148
Copy link
Contributor Author

@chrisvest,
I got it. I think to more meant should change the word proceeding by other words.

chrisvest added a commit to chrisvest/netty that referenced this issue Jan 15, 2021
Motivation: The writing was unclear.
Modification: Clarified the documentation.
Result: No more ambiguity about what FTL.remove() does.

Fixes netty#10914
chrisvest added a commit that referenced this issue Jan 15, 2021
Motivation: The writing was unclear.
Modification: Clarified the documentation.
Result: No more ambiguity about what FTL.remove() does.

Fixes #10914
chrisvest added a commit that referenced this issue Jan 15, 2021
Motivation: The writing was unclear.
Modification: Clarified the documentation.
Result: No more ambiguity about what FTL.remove() does.

Fixes #10914
ZzxyNn pushed a commit to ZzxyNn/netty that referenced this issue Jan 29, 2021
Motivation: The writing was unclear.
Modification: Clarified the documentation.
Result: No more ambiguity about what FTL.remove() does.

Fixes netty#10914
raidyue pushed a commit to raidyue/netty that referenced this issue Jul 8, 2022
Motivation: The writing was unclear.
Modification: Clarified the documentation.
Result: No more ambiguity about what FTL.remove() does.

Fixes netty#10914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants