syncutil

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package syncutil adds functions for synchronization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wait

func Wait(ctx context.Context, wg *sync.WaitGroup) error

Wait for a sync.WaitGroup with support for timeout/cancellations from context.

Types

type AtomicInt

type AtomicInt int32

AtomicInt uses sync/atomic to store and read the value of an int32.

func NewAtomicInt

func NewAtomicInt(value int32) *AtomicInt

NewAtomicInt creates an new AtomicInt.

func (*AtomicInt) Set

func (i *AtomicInt) Set(value int32)

func (*AtomicInt) Value

func (i *AtomicInt) Value() int32

Jump to

Keyboard shortcuts

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