Use semaphores to lock critical code path in score update

* Use semaphores to lock critical code path in score update