diff options
-rw-r--r-- | gwic.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -30,6 +30,8 @@ type work struct { done chan struct{} } +// By writing to w.done we make sure that the goroutine has finished +// sending to the out channel before returning from this method. func (w *work) finish() { close(w.c) w.done <- struct{}{} |