Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement bytemuck traits where appropriate #286

Open
eira-fransham opened this issue Jun 7, 2021 · 0 comments · May be fixed by #287
Open

Implement bytemuck traits where appropriate #286

eira-fransham opened this issue Jun 7, 2021 · 0 comments · May be fixed by #287

Comments

@eira-fransham
Copy link

A nice optimisation provided by bytemuck is the ability to do zeroed heap allocations using calloc safely. Since the default parking_lot Mutex and RwLock have an all-zeroes default state, then this means for any safely zeroable type T, RwLock<T> and Mutex<T> are also safely zeroable - and, by extension, FairMutex too. ReentrantMutex is not, however. Implementing these traits - even if behind a feature gate - would make some use-cases using collections of mutexes faster.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant