Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
* Not sure why, but when I first looked for locks in golang, I was told Just use a channel!, so i did. I have not found a reason to go back and use the actual sync library since this actually works well and is just super simple a buffered channel can act as a semaphore where acquiring is writing to the channel and release is reading
func NewLock ¶
* Locks have a name so they can be easily debugged when there is a deadlock and I forget to release it some where
func (*Lock) EnableDebug ¶
func (lock *Lock) EnableDebug()
Click to show internal directories.
Click to hide internal directories.