Fast resizable golang semaphore primitive
It's reasonable for the number of resources to be set to zero. (The limit could later be increased once resources are available, for example.)