grpc: google.golang.org/grpc/internal/grpcsync Index | Files

package grpcsync

import "google.golang.org/grpc/internal/grpcsync"

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

Index

Package Files

event.go

type Event Uses

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

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

func NewEvent Uses

func NewEvent() *Event

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

func (*Event) Done Uses

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

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

func (*Event) Fire Uses

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.

func (*Event) HasFired Uses

func (e *Event) HasFired() bool

HasFired returns true if Fire has been called.

Package grpcsync imports 2 packages (graph) and is imported by 3 packages. Updated 2018-11-14. Refresh now. Tools for package owners.