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

maitake-sync: add fair spinlock #471

Open
hawkw opened this issue Jan 27, 2024 · 0 comments
Open

maitake-sync: add fair spinlock #471

hawkw opened this issue Jan 27, 2024 · 0 comments
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request

Comments

@hawkw
Copy link
Owner

hawkw commented Jan 27, 2024

maitake-sync's async Mutex and RwLock are guaranteed to be fair, because they use FIFO wait queues. however, the spin module's blocking locks are not fair. it would be nice to have a fair FIFO spinlock in maitake-sync, in addition to our current unfair mutex. we could implement a fair spinlock using a ticket lock.

@hawkw hawkw added crate/maitake Related to the `maitake` crate kind/enhancement New feature or request labels Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant