Documentation ¶
Index ¶
- Variables
- type Concurrent
- func (c *Concurrent) AddError(e error)
- func (c *Concurrent) Call(function interface{}, params ...interface{}) error
- func (c *Concurrent) Clear()
- func (c *Concurrent) ClearErrors()
- func (c *Concurrent) Close()
- func (c *Concurrent) GetErrors() []error
- func (c *Concurrent) GetLastError() error
- func (c *Concurrent) HasError() bool
- func (c *Concurrent) Next() ([]interface{}, error)
- func (c *Concurrent) NextNoBlock() ([]interface{}, error)
- func (c *Concurrent) Wait()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotPrep = errors.New("the next Value is not prepared yet")
View Source
var ErrVChanClosed = errors.New("the value-channel has been closed")
Functions ¶
This section is empty.
Types ¶
type Concurrent ¶
type Concurrent struct {
// contains filtered or unexported fields
}
Concurrent represents a concurrent operation unit
func New ¶
func New(threads int, orderReturn bool) *Concurrent
New returns a new ConCurrent struct pointer
func (*Concurrent) AddError ¶
func (c *Concurrent) AddError(e error)
func (*Concurrent) Call ¶
func (c *Concurrent) Call(function interface{}, params ...interface{}) error
Call will execute the function concurrently, if the function is executable
func (*Concurrent) ClearErrors ¶
func (c *Concurrent) ClearErrors()
func (*Concurrent) Close ¶
func (c *Concurrent) Close()
Close closes the concurrent instance, it will block until all the process are finished
func (*Concurrent) GetErrors ¶
func (c *Concurrent) GetErrors() []error
func (*Concurrent) GetLastError ¶
func (c *Concurrent) GetLastError() error
func (*Concurrent) HasError ¶
func (c *Concurrent) HasError() bool
func (*Concurrent) Next ¶
func (c *Concurrent) Next() ([]interface{}, error)
Next will return the value performed by the function, and if it's not prepared yet, Next will block the process
func (*Concurrent) NextNoBlock ¶
func (c *Concurrent) NextNoBlock() ([]interface{}, error)
NextNoBlock will the value performed by the function without blocking
func (*Concurrent) Wait ¶
func (c *Concurrent) Wait()
Wait will block until all processes are completed
Click to show internal directories.
Click to hide internal directories.