should be volatile (or atomic Boolean)