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) 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) ReleaseOne ¶
func (p *Phaser) ReleaseOne()
Click to show internal directories.
Click to hide internal directories.