Skip to content

Rewrite rwl_destroy() to handle all possible cases. #1

Description

@JasonPap

When using the ReadWriteLock you should always wait for all threads to unlock then call rwl_destroy().

Currently if rwl_destroy() is called while another thread is waiting on one of the semaphores, the function will still destroy the semaphore leaving the other thread in an undefined state.

This should be fixed in order to make this API truly thread-safe.

With that in mind I implemented the isActive() function but it is currently unused.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions