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

Switch mutex implementation #447

Open
skyzh opened this issue Oct 26, 2022 · 3 comments
Open

Switch mutex implementation #447

skyzh opened this issue Oct 26, 2022 · 3 comments

Comments

@skyzh
Copy link
Member

skyzh commented Oct 26, 2022

pthread lock behaviors are really strange on macOS. Probably we will need something better in BusTub. In Rust we have https://docs.rs/parking_lot/latest/parking_lot/index.html. Thinking of what could be possible for cpp.

@lmwnshn
Copy link
Collaborator

lmwnshn commented Oct 26, 2022

Or we can drop mac support again...

@c8ef
Copy link

c8ef commented Nov 19, 2022

WebKit has something similar: https://github.com/WebKit/webkit/blob/main/Source/WTF/wtf/ParkingLot.h
ref: https://webkit.org/blog/6161/locking-in-webkit/

@infdahai
Copy link

infdahai commented Mar 27, 2023

the dependency on parking_lot's impl in webkit is a bit heavy . perhaps we can consider folly (https://sourcegraph.com/github.com/facebook/folly/-/blob/folly/synchronization/Lock.h).

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

No branches or pull requests

4 participants