Skip to content

RWLock implementation issues #2

@balland

Description

@balland

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions