Add semaphore to limit resource usage