From 4e2225a64d61a84aedab5d3054199a5229b23c04 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Fri, 23 Oct 2015 19:43:02 +0200 Subject: Comment finish method --- gwic.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gwic.go b/gwic.go index c14a431..ace3fca 100644 --- a/gwic.go +++ b/gwic.go @@ -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{}{} -- cgit v1.2.3