Commit 0061429b authored by gsamain's avatar gsamain Committed by Xavier Thompson

Make with unlocked statement properly lock again when there is read and write needs

parent 3efd6358
......@@ -8486,10 +8486,10 @@ class LockCypclassNode(StatNode):
# We must unlock if we held a lock previously, and relock if we unlocked.
if self.state != "unlocked":
code.putln("Cy_UNLOCK(%s);" % self.obj.result())
elif self.was_rlocked:
code.putln("Cy_RLOCK(%s);" % self.obj.result())
elif self.was_wlocked:
code.putln("Cy_WLOCK(%s);" % self.obj.result())
elif self.was_rlocked:
code.putln("Cy_RLOCK(%s);" % self.obj.result())
def cython_view_utility_code():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment