Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimedMutex ¶
type TimedMutex struct {
// contains filtered or unexported fields
}
TimedMutex is a blocking mutex which will unlock after a specified time
func NewTimedMutex ¶
func NewTimedMutex(length time.Duration) *TimedMutex
NewTimedMutex creates a new timed mutex with a specified duration
func (*TimedMutex) LockForDuration ¶
func (t *TimedMutex) LockForDuration()
LockForDuration will start a timer, lock the mutex, then allow the caller to continue After the duration, the mutex will be unlocked
func (*TimedMutex) UnlockIfLocked ¶
func (t *TimedMutex) UnlockIfLocked() bool
UnlockIfLocked will unlock the mutex if its currently locked Will return true if successfully unlocked
Click to show internal directories.
Click to hide internal directories.