Use volatile in favor of explicit locking