Use select rather than a chan to block goroutine.