syncext

package
v0.0.346 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadChannelWithTimeout added in v0.0.24

func ReadChannelWithTimeout[T any](c chan T, timeout time.Duration) (T, bool)

func ReadNonBlocking added in v0.0.28

func ReadNonBlocking[T any](c chan T) (T, bool)

func WriteChannelWithTimeout added in v0.0.28

func WriteChannelWithTimeout[T any](c chan T, msg T, timeout time.Duration) bool

func WriteNonBlocking added in v0.0.28

func WriteNonBlocking[T any](c chan T, msg T) bool

Types

type Atomic added in v0.0.315

type Atomic[T any] struct {
	// contains filtered or unexported fields
}

func NewAtomic added in v0.0.315

func NewAtomic[T any](value T) *Atomic[T]

func (*Atomic[T]) Get added in v0.0.315

func (a *Atomic[T]) Get() T

func (*Atomic[T]) Set added in v0.0.315

func (a *Atomic[T]) Set(value T) T

type AtomicBool

type AtomicBool struct {
	// contains filtered or unexported fields
}

func NewAtomicBool

func NewAtomicBool(value bool) *AtomicBool

func (*AtomicBool) Get

func (a *AtomicBool) Get() bool

func (*AtomicBool) Set

func (a *AtomicBool) Set(value bool) bool

func (*AtomicBool) Wait added in v0.0.24

func (a *AtomicBool) Wait(waitFor bool)

func (*AtomicBool) WaitWithContext added in v0.0.24

func (a *AtomicBool) WaitWithContext(ctx context.Context, waitFor bool) error

func (*AtomicBool) WaitWithTimeout added in v0.0.26

func (a *AtomicBool) WaitWithTimeout(timeout time.Duration, waitFor bool) error

Jump to

Keyboard shortcuts

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