rspec/rules/S2222/description.adoc

3 lines
231 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
If a lock is acquired and released within a method, then it must be released along all execution paths of that method.
Failing to do so will expose the conditional locking logic to the method's callers and hence be deadlock-prone.