Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Aug 18, 2022
1 parent b4b82d7 commit 6d08792
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/taskRunner/taskRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ type ITask interface {
}

func NewTaskRunner[T ITask](ctx context.Context, factory func() T) *TaskRunner[T] {
chanLen := 100
r := &TaskRunner[T]{}
r.factory = factory
r.tasks = NewPriorityQueue[*item]()
r.tasksPushCh = make(chan *item, 100)
r.tasksPopCh = make(chan struct{}, 100)
r.tasksPushCh = make(chan *item, chanLen)
r.tasksPopCh = make(chan struct{}, chanLen)
r.ctx = ctx
r.start()
return r
Expand Down

0 comments on commit 6d08792

Please sign in to comment.