We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92e0053 commit 4dc5456Copy full SHA for 4dc5456
src/sync/mutex.cr
@@ -33,7 +33,7 @@ module Sync
33
def lock : Nil
34
unless @mu.try_lock?
35
unless @type.unchecked?
36
- if @locked_by == Fiber.current
+ if owns_lock?
37
raise Error::Deadlock.new unless @type.reentrant?
38
@counter += 1
39
return
src/sync/rw_lock.cr
@@ -85,7 +85,7 @@ module Sync
85
def lock_write : Nil
86
87
88
89
90
91
0 commit comments