testbarrier

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 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 Barrier

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

Barrier synchronizes a fixed number of goroutines at a deterministic test point.

func New

func New(parties int) *Barrier

func (*Barrier) Wait

func (b *Barrier) Wait()

Wait blocks a participant until the test releases every participant.

func (*Barrier) WaitForParties

func (b *Barrier) WaitForParties(t testing.TB, parties int)

WaitForParties waits until every participant reached Wait, then releases them together.

Jump to

Keyboard shortcuts

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