Making the refresh timer methods thread-safe