Skip to content

[pull] main from facebook:main #340

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

Merged
merged 2 commits into from
Jun 11, 2025
Merged

[pull] main from facebook:main #340

merged 2 commits into from
Jun 11, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 11, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Wilfred and others added 2 commits June 11, 2025 13:17
Summary:
`folly/coro/safe/` is one of the directories opted-in to the SPELL lint, but `typos` has found an additional issue in this directory.

Fix it :)

Reviewed By: Orvid

Differential Revision: D76420969

fbshipit-source-id: 2ef012b9e6804d906772cf00d2996ccf6d2c8810
Summary:
accessAllThreads needs to acquire several locks to keep the state of
the TL object being iterated stable across all threads during the lifetime of
the Accessor. The StaticMeta::lock_ prevents a thread's element array from
being reallocated due to it updating some, potentially unrelated, TL object.
The Accessor needs to read the element ptr from each thread's ThreadEntry
element array. The ThreadEntrySet for the TL object being iterated is also
locked to prevent any thread from altering the element it has for that TL
object while the Accessor is alive. By caching the element ptr in the
ThreadEntrySet, we eliminate the need for the Accessor to rely on `elements`
array in ThreadEntry and hence the need to acquire StaticMeta's lock_.

Besides simplifying the interactions between different parts of the
implementation, this change will also prevent false blocking of threads that
want to update TL object unrelated to the Accessor. It opens the path to
moving the element deleter info to ThreadEntrySet and further reduce per
element memory overheads.

Reviewed By: yfeldblum

Differential Revision: D76320828

fbshipit-source-id: 24065a1a24fd45a73248bc40a0cf5e6f8000ba49
@pull pull bot added the ⤵️ pull label Jun 11, 2025
@pull pull bot merged commit 20a8cd5 into nsclass:main Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant