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

Fix issue with readerwritelock usage in basilisp (#722) #731

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

ikappaki
Copy link
Contributor

Hi,

could you please review patch to fix what it seems to be a potential issue with how readwrite locks are used in basilisp. It addresses #722.

This was discovered while testing of the upcoming nrepl-server described in #723. The nrepl-server tests which are using threads were failing due to trying to release an rlock which has been already released, and is fixed as described in #722 by using with self._lock.gen_rlock() instead of a single instance of with self._rlock(). The error was

    File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/basilisp/lang/runtime.py", line 706, in find
    return v
   File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/readerwriterlock/rwlock.py", line 49, in __exit__
    self.release()
   File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/readerwriterlock/rwlock.py", line 344, in release
    if not self.v_locked: raise RELEASE_ERR_CLS(RELEASE_ERR_MSG)
 RuntimeError: release unlocked lock

Thanks

@chrisrink10 chrisrink10 merged commit ebfa81b into basilisp-lang:main Dec 15, 2023
8 checks passed
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