atomicx

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	atomic.Bool
	// contains filtered or unexported fields
}

AtomicBool is an atomic boolean type with Wait/Notify support.

func (*Bool) Broadcast

func (ab *Bool) Broadcast()

Broadcast wakes all goroutines waiting on the boolean.

func (*Bool) Signal

func (ab *Bool) Signal()

Signal wakes one goroutine waiting on the boolean.

func (*Bool) Wait

func (ab *Bool) Wait()

Wait blocks until the boolean is not equal to the given value.

type Int32

type Int32 struct {
	atomic.Int32
	// contains filtered or unexported fields
}

Int32 is an atomic int32 type with Wait/Notify support.

func (*Int32) Broadcast

func (ai *Int32) Broadcast()

Broadcast wakes all goroutines waiting on the int32.

func (*Int32) Signal

func (ai *Int32) Signal()

Signal wakes one goroutine waiting on the int32.

func (*Int32) Wait

func (ai *Int32) Wait()

Wait blocks until the int32 is not equal to the given value.

type Int64

type Int64 struct {
	atomic.Int64
	// contains filtered or unexported fields
}

Int64 is an atomic int64 type with Wait/Notify support.

func (*Int64) Broadcast

func (ai *Int64) Broadcast()

Broadcast wakes all goroutines waiting on the int64.

func (*Int64) Signal

func (ai *Int64) Signal()

Signal wakes one goroutine waiting on the int64.

func (*Int64) Wait

func (ai *Int64) Wait()

Wait blocks until the int64 is not equal to the given value.

type Pointer

type Pointer[T any] struct {
	atomic.Pointer[T]
	// contains filtered or unexported fields
}

Pointer is an atomic boolean type with Wait/Notify support.

func (*Pointer[T]) Broadcast

func (ap *Pointer[T]) Broadcast()

Broadcast wakes all goroutines waiting on the pointer.

func (*Pointer[T]) Signal

func (ap *Pointer[T]) Signal()

Signal wakes one goroutine waiting on the pointer.

func (*Pointer[T]) Wait

func (ap *Pointer[T]) Wait()

Wait blocks until the pointer is not equal to the given value.

type Uint32

type Uint32 struct {
	atomic.Uint32
	// contains filtered or unexported fields
}

Uint32 is an atomic uint32 type with Wait/Notify support.

func (*Uint32) Broadcast

func (au *Uint32) Broadcast()

Broadcast wakes all goroutines waiting on the uint32.

func (*Uint32) Signal

func (au *Uint32) Signal()

Signal wakes one goroutine waiting on the uint32.

func (*Uint32) Wait

func (au *Uint32) Wait()

Wait blocks until the uint32 is not equal to the given value.

type Uint64

type Uint64 struct {
	atomic.Uint64
	// contains filtered or unexported fields
}

Uint64 is an atomic uint64 type with Wait/Notify support.

func (*Uint64) Broadcast

func (au *Uint64) Broadcast()

Broadcast wakes all goroutines waiting on the uint64.

func (*Uint64) Signal

func (au *Uint64) Signal()

Signal wakes one goroutine waiting on the uint64.

func (*Uint64) Wait

func (au *Uint64) Wait()

Wait blocks until the uint64 is not equal to the given value.

type Uintptr

type Uintptr struct {
	atomic.Uintptr
	// contains filtered or unexported fields
}

Uintptr is an atomic uintptr type with Wait/Notify support.

func (*Uintptr) Broadcast

func (au *Uintptr) Broadcast()

Broadcast wakes all goroutines waiting on the uintptr.

func (*Uintptr) Signal

func (au *Uintptr) Signal()

Signal wakes one goroutine waiting on the uintptr.

func (*Uintptr) Wait

func (au *Uintptr) Wait()

Wait blocks until the uintptr is not equal to the given value.

type Value

type Value struct {
	atomic.Value
	// contains filtered or unexported fields
}

Value is an atomic interface{} type with Wait/Notify support.

func (*Value) Broadcast

func (av *Value) Broadcast()

Broadcast wakes all goroutines waiting on the value.

func (*Value) Signal

func (av *Value) Signal()

Signal wakes one goroutine waiting on the value.

func (*Value) Wait

func (av *Value) Wait()

Wait blocks until the value is not equal to the given value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL