enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 323 forks source link

Fix context lock removal #10273

Closed hubertp closed 2 months ago

hubertp commented 3 months ago

Pull Request Description

Removal of context lock assumed that one still holds a lock on it. This is no longer the case when using a withContextLock block that correctly manages the resource. This change fixes the IllegalMonitorStateException. Closes #10254.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

hubertp commented 2 months ago

Tried to address your comment @JaroslavTulach, didn't really see the need for AutoCloseable. If still not good, please feel free to send a patch to this PR

JaroslavTulach commented 2 months ago

If still not good, please feel free to send a patch to this PR

More encapsulation in c8b5111. Feel free to go with or without c8b5111 change.