package
module
Version:
v0.0.0-...-e7d0e91
Opens a new window with list of versions in this module.
Published: Nov 13, 2014
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.
README
¶
Documentation
¶
func Work(jobs <-chan interface{}, options *Options) <-chan interface{}
type Clock struct {
C <-chan interface{}
}
Clock sends the value given to the Send function after the delay specified in
NewClock. Sending another value will restart the timer.
NewClock constructs a new Clock with the given delay. Call Close to stop the
clock's goroutine.
Close stops the timer. Close will panic if Close has already been called.
func (c *Clock) Send(v interface{})
Send restarts the timer with the new value. Start will panic if Close has been
called.
type Options struct {
Work func(interface{}) interface{}
NumWorkers int
MaxWaiting int
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.