syncext

package
v0.0.125 Latest Latest
Warning

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

Go to latest
Published: May 28, 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 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)

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