synchronize on getAnonVar to avoid counter race condition