atomic

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package atomic contains extensions of "sync/atomic"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool int32

Bool is an atomically accessible boolean. Its initial state is false.

func (*Bool) IsSet

func (b *Bool) IsSet() bool

IsSet returns whether the bool is set.

func (*Bool) Set

func (b *Bool) Set()

Set atomically sets the bool to true.

func (*Bool) TrySet

func (b *Bool) TrySet() bool

TrySet atomically sets the bool to true and returns whether it was false before.

func (*Bool) TryUnset

func (b *Bool) TryUnset() bool

TryUnset atomically sets the bool to false and returns whether it was true before.

func (*Bool) Unset

func (b *Bool) Unset()

Unset atomically sets the bool to false.

Jump to

Keyboard shortcuts

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