@remen not sure that such thing exists, but you could implement analog of semaphore on Channel. Just create Channel with some capacity and send needed number of elements to it. And then in coroutine read value from channel, and after done put value back.