enum
Sync::Lockable::Type
Defined in:
lockable.crEnum Members
-
Unchecked =
0 -
The lock doesn't do any checks. Trying to relock will cause a deadlock, unlocking from any fiber is undefined behavior.
-
Checked =
1 -
The lock checks whether the current fiber owns the lock. Trying to relock will raise a
Error::Deadlockexception, unlocking when unlocked or while another fiber holds the lock will raise anError. -
Reentrant =
2 -
Same as
Checkedwith 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.
Instance Method Summary
-
#checked?
Returns
trueif this enum value equalsChecked -
#reentrant?
Returns
trueif this enum value equalsReentrant -
#unchecked?
Returns
trueif this enum value equalsUnchecked