Skip to content

fix: toward correct locking mechanism - #163

Closed
bogovicj wants to merge 2 commits into
masterfrom
fix/locking
Closed

fix: toward correct locking mechanism#163
bogovicj wants to merge 2 commits into
masterfrom
fix/locking

Conversation

@bogovicj

Copy link
Copy Markdown
Contributor
  • multiple read locks can be held across threads
  • only a single write lock can be held
  • still to do: holding a read lock does not prevent writing

see #141

* multiple read locks can be held across threads
* only a single write lock can be held
* still to do: holding a read lock does not prevent writing

see #141
@bogovicj

Copy link
Copy Markdown
Contributor Author

This PR also adds a test that fails using the current locking mechanism but passes after the changes introduced here.

The test checks that read locks are not exclusive - that a thread holding a read lock does not block another thread from reading.

@bogovicj bogovicj closed this Jul 18, 2025
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.

1 participant