0 The lock doesn't do any checks. Trying to relock will cause a deadlock, unlocking from any fiber is undefined behavior.
1 The lock checks whether the current fiber owns the lock. Trying to relock will raise a Error::Deadlock exception, unlocking when unlocked or while another fiber holds the lock will raise an Error.
2 Same as Checked with the difference that the lock allows the same fiber to re-lock as many times as needed, then must be unlocked as many times as it was re-locked.
Returns true if this enum value equals Checked
Returns true if this enum value equals Reentrant
Returns true if this enum value equals Unchecked
Enum
Enum
Enum
Enum
Comparable(Enum)
Value
Object
Object
Object
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Sync/Type.html