Skip to content

Conversation

@Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Feb 7, 2024

Buckets are allocated on demand based on Thread::bucket. This means that when only threads with a high id (and thus high bucket) are writing entries into the ThreadLocal, only higher buckets will be allocated, and lower buckets will be null.

Thus we must not early-return when encounting a null bucket.


This seems to be a regression introduced in #51 and #53, and should fix #54.

@Amanieu
Copy link
Owner

Amanieu commented Feb 20, 2024

LGTM once CI is fixed by #69.

Buckets are allocated on demand based on `Thread::bucket`.
This means that when only threads with a high `id` (and thus high `bucket`) are writing entries into the `ThreadLocal`,
only higher `buckets` will be allocated, and lower buckets will be `null`.

Thus we must not early-return when encounting a `null` bucket.
@Swatinem Swatinem mentioned this pull request Feb 20, 2024
@Amanieu Amanieu merged commit 0c2163c into Amanieu:master Feb 20, 2024
@Swatinem Swatinem deleted the no-early-return branch February 21, 2024 08:38
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.

Tests occasionally fail (Apple M2 Max)

2 participants