Skip to content

Commit

Permalink
Expose queue done channel to allow for selecting when the channel is …
Browse files Browse the repository at this point in the history
…done
  • Loading branch information
DennisDenuto committed Jul 6, 2017
1 parent fa68f87 commit e5f6d3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ func (q *Queue) Block() {
<-q.done
}

func (q *Queue) Done() <-chan struct{} {
return q.done
}

// Cancel closes the Queue and drains the pending commands without processing
// them, allowing for a fast "stop immediately"-ish operation.
func (q *Queue) Cancel() error {
Expand Down

0 comments on commit e5f6d3c

Please sign in to comment.