Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BacklogPool ¶
type BacklogPool interface { ExecutionPool IsFull() bool EnqueueBacklog(enqueueCtx context.Context, t ExecFunc, arg interface{}, out chan interface{}) error }
BacklogPool supports all the ExecutionPool functions plus few more that tests the pending tasks.
func MakeBacklog ¶
func MakeBacklog(execPool ExecutionPool, backlogSize int, priority Priority, owner interface{}) BacklogPool
MakeBacklog creates a backlog
type ExecFunc ¶
type ExecFunc func(interface{}) interface{}
A ExecFunc is a unit of work to be executed by a Pool goroutine.
Note that a ExecFunc will occupy a Pool goroutine, so do not schedule tasks that spend an excessive amount of time waiting.
type ExecutionPool ¶
type ExecutionPool interface { Enqueue(enqueueCtx context.Context, t ExecFunc, arg interface{}, i Priority, out chan interface{}) error GetOwner() interface{} Shutdown() GetParallelism() int }
ExecutionPool interface exposes the core functionality of the execution pool.
Click to show internal directories.
Click to hide internal directories.