Skip to content

[llvm/Support] Make llvm::sys::RWMutex Lockable (#90667) #8676

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

Merged

Conversation

medismailben
Copy link

This patch extends the llvm::sys::RWMutex class to fullfill the Lockable requirement to include attempted locking, by implementing a bool try_lock member function.

As the name suggests, this method will try to acquire to lock in a non-blocking fashion and release it immediately. If it managed to acquire the lock, returns true, otherwise returns false.

Signed-off-by: Med Ismail Bennani [email protected]
(cherry picked from commit bf447e2)

This patch extends the `llvm::sys::RWMutex` class to fullfill the
`Lockable` requirement to include attempted locking, by implementing a
`bool try_lock` member function.

As the name suggests, this method will try to acquire to lock in a
non-blocking fashion and release it immediately. If it managed to
acquire the lock, returns `true`, otherwise returns `false`.

Signed-off-by: Med Ismail Bennani <[email protected]>
(cherry picked from commit bf447e2)
@medismailben medismailben requested a review from JDevlieghere May 1, 2024 22:49
@medismailben
Copy link
Author

@swift-ci test

@medismailben
Copy link
Author

@swift-ci test windows platform

@JDevlieghere JDevlieghere merged commit bca1c2b into swiftlang:swift/release/6.0 May 2, 2024
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