notify

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package notify signals subscribers that something changed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signals

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

Signals is a set of change channels. Each channel holds at most one pending signal, so a slow subscriber sees one wake-up for any number of changes and a notifier never blocks. The zero value is ready to use.

func (*Signals) Notify

func (s *Signals) Notify()

Notify signals every subscriber that has no signal pending.

func (*Signals) Subscribe

func (s *Signals) Subscribe() chan struct{}

Subscribe returns a channel signalled on every Notify.

func (*Signals) Unsubscribe

func (s *Signals) Unsubscribe(ch chan struct{})

Unsubscribe stops signals to ch; a channel that is not subscribed is ignored.

Jump to

Keyboard shortcuts

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