Something semaphoreish, but with a variable number of tokens