Documentation
¶
Overview ¶
Package pool provides access to a mixer-global pool of buffers, a pool of goroutines, and a string interning table.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoroutinePool ¶
type GoroutinePool struct {
// contains filtered or unexported fields
}
GoroutinePool represents a set of reusable goroutines onto which work can be scheduled.
func NewGoroutinePool ¶
func NewGoroutinePool(queueDepth int, singleThreaded bool) *GoroutinePool
NewGoroutinePool creates a new pool of goroutines to schedule async work.
func (*GoroutinePool) AddWorkers ¶
func (gp *GoroutinePool) AddWorkers(numWorkers int)
AddWorkers introduces more goroutines in the worker pool, increasing potential parallelism.
func (*GoroutinePool) Close ¶
func (gp *GoroutinePool) Close()
Close waits for all goroutines to terminate
func (*GoroutinePool) ScheduleWork ¶
func (gp *GoroutinePool) ScheduleWork(fn WorkFunc)
ScheduleWork registers the given function to be executed at some point
Click to show internal directories.
Click to hide internal directories.