Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UpgradeableMutex ¶
type UpgradeableMutex struct {
// contains filtered or unexported fields
}
UpgradeableMutex wraps a RWMutex and provides safe upgrading / downgrading by informing you whether a write lock was achieved in the brief swap time
func (*UpgradeableMutex) DowngradeLock ¶
func (mu *UpgradeableMutex) DowngradeLock() bool
DowngradeLock downgrades a write to a read lock, returning success state as a bool
func (*UpgradeableMutex) Lock ¶
func (mu *UpgradeableMutex) Lock()
Lock wraps the internal RWMutex, atomically storing the last write-lock time
func (*UpgradeableMutex) RLock ¶
func (mu *UpgradeableMutex) RLock()
RLock exactly wraps the internal RWMutex
func (*UpgradeableMutex) RUnlock ¶
func (mu *UpgradeableMutex) RUnlock()
RUnlock exactly wraps the internal RWMutex
func (*UpgradeableMutex) Unlock ¶
func (mu *UpgradeableMutex) Unlock()
Unlock exactly wraps the internal RWMutex
func (*UpgradeableMutex) UpgradeLock ¶
func (mu *UpgradeableMutex) UpgradeLock() bool
UpgradeLock upgrades a read to a write lock, returning success state as a bool
Click to show internal directories.
Click to hide internal directories.