# Packages
Package task contains types that can be used to create cancelable tasks.
# Functions
AsHandler wraps a destination into an event handler.
AsPredicate wraps a function into an event predicate.
AsProducer wraps an event generator into an event producer.
Buffer returns a handler that will feed the supplied handler, but inserts a unbounded buffer and goroutine switch between the two handlers so that the input handler always returns immediatly without waiting for the underlying handler to be invoked and complete.
Connect adds a handler to a listener in a way that blocks until the handler is done.
Drain returns a handler wrapper and a channel that will block until the event stream is done.
Feed passes events from a producer to the handler.
Filter returns a handler that only forwards events to the underlying handler if pred is true for that event.
FilterAny returns a handler that only forwards events to the underlying handler if pred is true for that event.
Monitor feeds an initial producer to the handler, and then adds a handler to the listener.
# Interfaces
Source is the type for a closable event producer.
# Type aliases
Broadcast implements a list of handlers that itself is a handler.
Handler is the type for functions to which events can be delivered.
Listener is the signature for a function that accepts handlers to send events to.
Predicate is the signature for a function that tests an event for a boolean property.
Producer is the type for a function that generates events.