Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Background ¶
type Background struct {
// contains filtered or unexported fields
}
func NewListener ¶
func NewListener() *Background
func (*Background) Observe ¶
func (b *Background) Observe(task Task)
func (*Background) Quit ¶
func (b *Background) Quit()
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job is an object whose handle can be specified in functions to safely manage the execution of multiple goroutines
type Threading ¶
type Threading struct { // Read retrieves data in blocks Read func(offset, block int) (interface{}, error) // Execute processes data Execute func(data interface{}, block int) error // BlockSize of data processed in a single round of execution. BlockSize int // Nodes refers to number of running goroutines. Nodes int // contains filtered or unexported fields }
Threading is an organized collection of goroutines that executes a single task concurrently.
func MakeThreading ¶
MakeThreading safely executes multiple goroutines to process a single task! It includes a Read and Execute operation, and expects offset & limit index of data to be processed.
type Util ¶
type Util struct { // Read retrieves data in blocks Read func(offset, block int) (interface{}, error) // Execute processes data Execute func(data interface{}, block int) error // MakeInterval returns the offset and limit [a,b] // of data to be processed MakeInterval func() (idx, limit int, err error) // BlockSize of data processed in a single round of execution. BlockSize int // Nodes refers to number of running goroutines Nodes int }
Click to show internal directories.
Click to hide internal directories.