这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@hawkw
Copy link
Owner

@hawkw hawkw commented Jan 27, 2024

This commit adds a synchronous RwLock spinlock to
maitake_sync::spin.

hawkw added 4 commits January 27, 2024 11:19
This fixes an issue where the non-`loom` test wrappers would eat logs
from spawned threads, because the thread-local `tracing` subscriber was
not propagated correctly.
This fixes an issue where the `util::Backoff` helper in `maitake_sync`
would emit too many spins in loom mode, hitting the branch limit.
This commit adds a synchronous `RwLock` spinlock to
`maitake_sync::spin`.

Closes #470
@hawkw hawkw enabled auto-merge (rebase) January 27, 2024 19:21
@hawkw hawkw merged commit d6199bf into main Jan 27, 2024
@hawkw hawkw deleted the eliza/spin-rwlock branch January 27, 2024 19:26
hawkw added a commit that referenced this pull request Jan 27, 2024
This fixes an issue where the non-`loom` test wrappers would eat logs
from spawned threads, because the thread-local `tracing` subscriber was
not propagated correctly.
hawkw added a commit that referenced this pull request Jan 27, 2024
hawkw added a commit that referenced this pull request Jan 27, 2024
This fixes an issue where the `util::Backoff` helper in `maitake_sync`
would emit too many spins in loom mode, hitting the branch limit.
hawkw added a commit that referenced this pull request Jan 27, 2024
This commit adds `Default` impls to `Mutex`, `RwLock`, and `spin::Mutex`
where `T: Default`, allowing locked data to be constructed through
`Default` without needing `Mutex::new(Default::default())` or similar.

An implementation of `Default` for `spin::RwLock` was not added, because
I already did that in #472.
hawkw added a commit that referenced this pull request Jan 27, 2024
This commit adds `Default` impls to `Mutex`, `RwLock`, and `spin::Mutex`
where `T: Default`, allowing locked data to be constructed through
`Default` without needing `Mutex::new(Default::default())` or similar.

An implementation of `Default` for `spin::RwLock` was not added, because
I already did that in #472.
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.

2 participants