package
Version:
v0.2.2
Opens a new window with list of versions in this module.
Published: Jun 30, 2018
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
New returns a receive-only request channel
processed by `cap` balanced workers
Balancer has a Pool of Workers and a channel for Workers having finished
Pool is a slice of (pointers to) Worker and
implements Heap: Len Less Swap Push Pop.
Len reports the number of elements in the heap.
Less reports whether the element @ [i] should sort before the element @ [j].
func (p *Pool) Pop() (v interface{})
Pop removes and returns the element @ [ Len() - 1 ].
func (p *Pool) Push(v interface{})
Push add v as element @ [ Len() ].
Swap swaps the elements @ [i] and [j].
Request is a function to be applied and channel on which to return the result.
A Worker works on received requests
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.