Sending and receving from chans on the same goroutine is a bad idea.