reverted to atomic<int> approach, with an atomic decrement and check instead. Also mutexed the allRendered signal call