Documentation ¶
Overview ¶
Package scheduler defines schedulers to execute functions on DAGs based on a specific scheduling strategy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parallel ¶
type Parallel[V any] struct { // contains filtered or unexported fields }
Parallel is a parallel scheduler implementing the scheduler.S interface.
func NewParallel ¶
NewParallel creates a new parallel scheduler for the given DAG.
type S ¶
type S[V any] interface { // Run executes a given function by a specific scheduling strategy. Run(Func[V]) error }
S is the scheduler interface.
type Sequential ¶
type Sequential[V any] struct { // contains filtered or unexported fields }
Sequential is a sequential scheduler implementing the scheduler.S interface.
func NewSequential ¶
func NewSequential[V any](d *dag.DAG[V], reverse bool) *Sequential[V]
NewSequential creates a new sequential scheduler for the given DAG.
func (*Sequential[V]) Run ¶
func (s *Sequential[V]) Run(f Func[V]) error
Run executes the given function on each node of the DAG. Nodes are run sequentially by their topological order.
Click to show internal directories.
Click to hide internal directories.