Skip to content

docs: update ThreadLocal<T>.asContextElement documentation #4437

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nikitabobko
Copy link
Member

The latest code snippet in the KDoc is no longer relevant. Coroutines update and restore the thread-local value on every suspension points.

The code became irrelevant after
727c38f (related issue: #985)

Use withContext to update the corresponding thread-local variable to a different value, for example:

The commit drops this paragraph and the attached code snippet. The snippet is useless since the correct usage pattern is already demonstraited in the first code snippet.

The latest code snippet in the KDoc is no longer relevant. Coroutines
update and restore the thread-local value on every suspension points.

The code became irrelevant after
727c38f (related issue:
#985)

> Use `withContext` to update the corresponding thread-local variable to a different value, for example:

The commit drops this paragraph and the attached code snippet. The
snippet is useless since the correct usage pattern is already
demonstraited in the first code snippet.
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 this pull request may close these issues.

1 participant