Documentation ¶
Overview ¶
Package umutex provides unblocking mutex
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnblockingMutex ¶
type UnblockingMutex struct { // Raw channel C chan bool }
UnblockingMutex represents an unblocking mutex.
func (UnblockingMutex) ForceLock ¶
func (m UnblockingMutex) ForceLock()
ForceLock surely locks the mutex, however, this function blocks when the mutex is locked at the time.
func (UnblockingMutex) TryLock ¶
func (m UnblockingMutex) TryLock() (result bool)
TryLock tries to lock the mutex. When the mutex is free at the time, the function locks the mutex and return true. Otherwise false will be returned. In the both cases, this function doens't block and return the result immediately.
Click to show internal directories.
Click to hide internal directories.