syncx

package
v0.0.0-...-b08fcc5 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicBool

type AtomicBool uint32

An AtomicBool is an atomic implementation for boolean values.

func ForAtomicBool

func ForAtomicBool(val bool) *AtomicBool

ForAtomicBool returns an AtomicBool with given val.

func NewAtomicBool

func NewAtomicBool() *AtomicBool

NewAtomicBool returns an AtomicBool.

func (*AtomicBool) CompareAndSwap

func (b *AtomicBool) CompareAndSwap(old, val bool) bool

CompareAndSwap compares current value with given old, if equals, set to given val.

func (*AtomicBool) Set

func (b *AtomicBool) Set(v bool)

Set sets the value to v.

func (*AtomicBool) True

func (b *AtomicBool) True() bool

True returns true if current value is true.

type DoneChan

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

A DoneChan is used as a channel that can be closed multiple times and wait for done.

func NewDoneChan

func NewDoneChan() *DoneChan

NewDoneChan returns a DoneChan.

func (*DoneChan) Close

func (dc *DoneChan) Close()

Close closes dc, it's safe to close more than once.

func (*DoneChan) Done

func (dc *DoneChan) Done() chan lang.PlaceholderType

Done returns a channel that can be notified on dc closed.

Jump to

Keyboard shortcuts

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