Use double-check locking (with volatile) to avoid having to get the lock unless necessary, and re-work the test to be as tight as possible.