ensure @state check and set operations are done in critical section, to avoid this method from being executed multiple times in a multi-threaded race-condition scenario