performance: wait for oauth-token using semaphore instead of busy waiting