sync

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 1 Imported by: 275

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicBool added in v0.35.0

type AtomicBool int32

AtomicBool is an atomic Boolean. Its methods are all atomic, thus safe to be called by multiple goroutines simultaneously. Note: When embedding into a struct one should always use *AtomicBool to avoid copy. it's a simple implmentation from https://github.com/tevino/abool

func NewBool added in v0.35.0

func NewBool(ok bool) *AtomicBool

NewBool creates an AtomicBool with given default value.

func (*AtomicBool) IsSet added in v0.35.0

func (ab *AtomicBool) IsSet() bool

IsSet returns whether the Boolean is true.

func (*AtomicBool) Set added in v0.35.0

func (ab *AtomicBool) Set()

Set sets the Boolean to true.

func (*AtomicBool) UnSet added in v0.35.0

func (ab *AtomicBool) UnSet()

UnSet sets the Boolean to false.

Jump to

Keyboard shortcuts

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