concurrency

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package concurrency contains utilities for goroutines coordination

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executed

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

Executed can be used to wait for something to be executed, it has a similar semantics to sync.Cond, but with a way to know whether it was already executed once and waiting only if that's not the case.

func NewExecuted

func NewExecuted() *Executed

NewExecuted creates a new Executed

func (*Executed) Broadcast

func (i *Executed) Broadcast()

Broadcast broadcasts execution to waiting goroutines

func (*Executed) Wait

func (i *Executed) Wait()

Wait waits for execution

type MultipleExecuted

type MultipleExecuted []*Executed

MultipleExecuted can be used to wrap multiple Executed conditions that should all be waited

func (MultipleExecuted) Wait

func (m MultipleExecuted) Wait()

Wait waits for the execution for all the conditions in a MultipleExecuted

Jump to

Keyboard shortcuts

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