Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker guards one file against other goroutines with an RWMutex, and against other processes with a lock file. Both spin on a try-lock, so neither is fair: a writer cannot preempt a steady stream of readers. The token cache relies on every holder releasing quickly, as a read is one field and a write is one token refresh. A holder of Lock may keep it for as long as a person takes, so whoever waits for such a lock gives up after a short timeout.
Click to show internal directories.
Click to hide internal directories.