Added int channel to be used as semaphore, as per Effective Go.