Documentation ¶
Overview ¶
Package sync provides various synchronization primitives
Package sync provides various synchronization primitives
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher allows multiple subscriptions to a continuous stream of published events. Subscribers can cancel their subscription. The zero value is ready for use.
func (*Publisher) Subscribe ¶
func (p *Publisher) Subscribe() *Subscriber
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber
func (*Subscriber) Scrub ¶
func (s *Subscriber) Scrub()
Scrub and Wait must be not be called concurrently.
func (*Subscriber) Wait ¶
func (s *Subscriber) Wait() interface{}
Scrub and Wait must be not be called concurrently.
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger provides a mechanism for reconciling competing callers, only one of which should succeed in obtaining the lock (and taking some action).
type WaitUntil ¶
WaitUntil notifies subscriber of a sequence of events
func (*WaitUntil) MakeWaiter ¶
Click to show internal directories.
Click to hide internal directories.