Use [`sync.WaitGroup`](http://golang.org/pkg/sync/#WaitGroup)

```go
wg := sync.WaitGroup{}

wg.Add(2)
go func(w *sync.WaitGroup) {
   defer w.Done()
   rwCopy(rw2, rw1)
   conn2.Close()
}(&wg)
go func(w *sync.WaitGroup) {
   defer w.Done()
   rwCopy(rw1, rw2)
   conn1.Close()
}(&wg)

wg.Wait()
```