Use semaphore to control rsync threads