Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

grpcsync

v1.14.0
github.com/bglmmz/grpc/internal/grpcsync

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

6 matches

Top ↑

Package grpcsync implements additional synchronization primitives built upon the sync package.

Types

Event

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

Event represents a one-time event that may occur in the future.

NewEvent

func NewEvent() *Event

NewEvent returns a new, ready-to-use Event.

Event.Done

func (e *Event) Done() <-chan struct{}

Done returns a channel that will be closed when Fire is called.

Event.Fire

func (e *Event) Fire() bool

Fire causes e to complete. It is safe to call multiple times, and concurrently. It returns true iff this call to Fire caused the signaling channel returned by Done to close.

Event.HasFired

func (e *Event) HasFired() bool

HasFired returns true if Fire has been called.

Dependency graph