notifier

package
v0.0.0-...-09d31aa Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

A Notifier is a synchronization primitive for waking upp all listeners at once.

func (*Notifier) Broadcast

func (notifier *Notifier) Broadcast()

Broadcast wakes all listeners if there are any.

func (*Notifier) C

func (notifier *Notifier) C() <-chan struct{}

C gets the channel that'll close on the next notification.

func (*Notifier) Wait

func (notifier *Notifier) Wait(ctx context.Context) error

Wait waits for the next `Broadcast` call, or the context's termination.

Jump to

Keyboard shortcuts

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