[Use SimpleSemaphore to make code simple.