OK, now I understand why a semaphore is needed. I think we just need a volatile keyword in front of `activeBenchmarks`?