Documentation ¶
Overview ¶
Package futures emulates Python's concurrent.futures package as well as is possible with Go's lack of parametric types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Maintains the pool of workers and receives new work.
func NewExecutor ¶
Create a new Executor that does up to maxWorkers tasks in parallel.
func (*Executor) Map ¶
func (me *Executor) Map(fn func(interface{}) interface{}, inputs <-chan interface{}) <-chan interface{}
Calls fn with each item received from inputs, and outputs the results in the same order to the returned channel.
Click to show internal directories.
Click to hide internal directories.