Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultParallelism int = 16
DefaultParallelism is the default parallelism used in scheduler.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parallelizer ¶
type Parallelizer struct {
// contains filtered or unexported fields
}
Parallelizer holds the parallelism for scheduler.
func NewParallelizer ¶
func NewParallelizer(p int) Parallelizer
NewParallelizer returns an object holding the parallelism.
func (Parallelizer) Until ¶
func (p Parallelizer) Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc)
Until is a wrapper around workqueue.ParallelizeUntil to use in scheduling algorithms.
Click to show internal directories.
Click to hide internal directories.