Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicDuration ¶
type AtomicDuration int64
func (*AtomicDuration) CompareAndSwap ¶
func (d *AtomicDuration) CompareAndSwap(oldval, newval time.Duration) (swapped bool)
func (*AtomicDuration) Get ¶
func (d *AtomicDuration) Get() time.Duration
func (*AtomicDuration) Set ¶
func (d *AtomicDuration) Set(duration time.Duration)
type AtomicInt32 ¶
type AtomicInt32 int32
func (*AtomicInt32) Add ¶
func (i *AtomicInt32) Add(n int32) int32
func (*AtomicInt32) CompareAndSwap ¶
func (i *AtomicInt32) CompareAndSwap(oldval, newval int32) (swapped bool)
func (*AtomicInt32) Get ¶
func (i *AtomicInt32) Get() int32
func (*AtomicInt32) Set ¶
func (i *AtomicInt32) Set(n int32)
type AtomicInt64 ¶
type AtomicInt64 int64
func (*AtomicInt64) Add ¶
func (i *AtomicInt64) Add(n int64) int64
func (*AtomicInt64) CompareAndSwap ¶
func (i *AtomicInt64) CompareAndSwap(oldval, newval int64) (swapped bool)
func (*AtomicInt64) Get ¶
func (i *AtomicInt64) Get() int64
func (*AtomicInt64) Set ¶
func (i *AtomicInt64) Set(n int64)
type AtomicUint32 ¶
type AtomicUint32 uint32
func (*AtomicUint32) Add ¶
func (i *AtomicUint32) Add(n uint32) uint32
func (*AtomicUint32) CompareAndSwap ¶
func (i *AtomicUint32) CompareAndSwap(oldval, newval uint32) (swapped bool)
func (*AtomicUint32) Get ¶
func (i *AtomicUint32) Get() uint32
func (*AtomicUint32) Set ¶
func (i *AtomicUint32) Set(n uint32)
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore is a counting semaphore with the option to specify a timeout.
func NewSemaphore ¶
NewSemaphore creates a Semaphore. The count parameter must be a positive number. A timeout of zero means that there is no timeout.
Click to show internal directories.
Click to hide internal directories.