queue

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataQueue

func NewDataQueue() (chan<- interface{}, <-chan interface{})

NewDataQueue creates a pair of channels (a send-only channel and a receive-only channel) which form a queue. Arbitrary data may be sent via the queue. The send-only channel is always available for sending. Data are stored in an internal buffer until they are dequeued by reading from the receive-only channel. If the send-only channel is closed the receive-only channel will be closed after all data are consumed.

func NewEventQueue

func NewEventQueue() (chan<- struct{}, <-chan struct{})

NewEventQueue creates a pair of channels (a send-only channel and a receive-only channel) which form a queue. Events (empty structures) may be sent via the queue. The send-only channel is always available for sending. An internal count of events received but not consumed is maintained. If the send-only channel is closed the receive-only channel will be closed after all events are consumed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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