Use channels to wait for all goroutines to finish

 read more »