Ubuntu Pastebin

Paste from fwereade at Fri, 6 May 2016 15:07:05 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
package worker

func Dead(worker Worker) <-chan struct{} {
    ch := make(chan struct{})
    go func() {
        defer close(ch)
        worker.Wait()
    }
    return ch
}
Download as text