synctest

package
v0.185.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Phaser

type Phaser struct {
	// contains filtered or unexported fields
}
Example
package main

import (
	"go.llib.dev/testcase/pkg/synctest"
)

func main() {
	var p synctest.Phaser
	defer p.Finish()

	go func() { p.Wait() }()
	go func() { p.Wait() }()
	go func() { p.Wait() }()

	p.Release() // wait no longer blocks
}

func (*Phaser) Done

func (p *Phaser) Done() <-chan struct{}

func (*Phaser) Finish

func (p *Phaser) Finish()

Finish lets all waiting goroutines continue immediately. After it’s called, any new calls to Wait will also return right away.

func (*Phaser) Release

func (p *Phaser) Release()

func (*Phaser) ReleaseOne

func (p *Phaser) ReleaseOne()

func (*Phaser) Wait

func (p *Phaser) Wait()

Jump to

Keyboard shortcuts

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