Documentation ¶
Overview ¶
Package counter provides a thread safe counter using mutexes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutexCounter ¶
type MutexCounter struct {
// contains filtered or unexported fields
}
MutexCounter is a thread-safe counter
func (*MutexCounter) NotEqual ¶
func (mc *MutexCounter) NotEqual(i int) bool
NotEqual tests if the counters value is the same as the supplied value
func (*MutexCounter) Set ¶
func (mc *MutexCounter) Set(i int)
Set redefines the counter to a specified value
Click to show internal directories.
Click to hide internal directories.