Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockerCheckable ¶
type MutexCheckable ¶
type MutexCheckable struct {
// contains filtered or unexported fields
}
Difference to sync.Mutex, is what Unlock can be called if already unlocked. This can be used in sync.Cond without afraiding to get error when Unlock() called. NewMutexCheckable() must be used to create object of this struct.
func NewMutexCheckable ¶
func NewMutexCheckable(locked bool) *MutexCheckable
set locked to true, to make resulting Mutex already locked on creation
func (*MutexCheckable) IsLocakedByMe ¶
func (self *MutexCheckable) IsLocakedByMe() (locked bool, byme bool)
func (*MutexCheckable) LocekdByWho ¶
func (self *MutexCheckable) LocekdByWho() (locked bool, goid uint64)
func (*MutexCheckable) Unlock ¶
func (self *MutexCheckable) Unlock()
same as sync.Unlock(), except, doesn't results in error when called on unlocked MutexCheckable
Click to show internal directories.
Click to hide internal directories.