From e5f6d3cc50047581549261b69394cca73fd67338 Mon Sep 17 00:00:00 2001 From: DennisDenuto Date: Wed, 5 Jul 2017 21:55:41 -0700 Subject: [PATCH] Expose queue done channel to allow for selecting when the channel is done --- fetch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fetch.go b/fetch.go index a318524..9a71a32 100644 --- a/fetch.go +++ b/fetch.go @@ -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 {