Skip to content

Commit

Permalink
Improve Clarity of taskQueue Method Naming
Browse files Browse the repository at this point in the history
Signed-off-by: Drayton Munster <[email protected]>
  • Loading branch information
dwmunster authored and samuell committed Jun 15, 2019
1 parent f1ba3d3 commit 1acbf9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions process.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (p *Process) Run() {
// Execute task in separate go-routine
go t.Execute()
}
case <-tasksToBeProcessed.NextSignal():
case <-tasksToBeProcessed.NextTaskDone():
nextTask, tasksToBeProcessed = tasksToBeProcessed[0], tasksToBeProcessed[1:]
for oname, oip := range nextTask.OutIPs {
if !oip.doStream { // Streaming (FIFO) outputs have been sent earlier
Expand Down Expand Up @@ -413,9 +413,9 @@ func (p *Process) createTasks() (ch chan *Task) {

type taskQueue []*Task

// NextSignal allows us to wait for the next task to be done if it's available.
// Otherwise, nil is returned since nil channels always block.
func (tq taskQueue) NextSignal() chan int {
// NextTaskDone allows us to wait for the next task to be done if it's
// available. Otherwise, nil is returned since nil channels always block.
func (tq taskQueue) NextTaskDone() chan int {
if len(tq) > 0 {
return tq[0].Done
}
Expand Down

0 comments on commit 1acbf9d

Please sign in to comment.