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

RWLock implementation issues #2

Open
balland opened this issue May 27, 2019 · 0 comments
Open

RWLock implementation issues #2

balland opened this issue May 27, 2019 · 0 comments

Comments

@balland
Copy link

balland commented May 27, 2019

Your implementation of RWLock based on two mutexes requires that a mutex acquired by one thread can be released by another, which is not the case with the pthread_mutex implementation. What is on purpose? In my project, I solved this by implementing RWLock directly with pthread_rwlock instead.

When reaching this issue, I have also noticed that you do not check the result of these calls in RecursiveMutex. It would be great to throw proper errors here like you are doing when initialising the mutex.

Let me know if you would be interested by a PR.

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

1 participant