Skip to content

Commit

Permalink
placement of maxDep comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 17, 2024
1 parent 2009f95 commit a14e434
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ import (
// Executor ensures that conflicting tasks
// are executed in the order they were queued.
// Tasks with no conflicts are executed immediately.
//
// It is assumed that no single task has more than [maxDependencies].
// This is used to ensure a dependent task does not begin executing a
// task until all dependencies have been enqueued. If this invariant is
// violated, some tasks will never execute and this code could deadlock.
type Executor struct {
metrics Metrics

Expand All @@ -41,6 +36,11 @@ type Executor struct {
}

// New creates a new [Executor].
//
// It is assumed that no single task has more than [maxDependencies].
// This is used to ensure a dependent task does not begin executing a
// task until all dependencies have been enqueued. If this invariant is
// violated, some tasks will never execute and this code could deadlock.
func New(items, concurrency int, maxDependencies int64, metrics Metrics) *Executor {
e := &Executor{
metrics: metrics,
Expand Down

0 comments on commit a14e434

Please sign in to comment.