Replace BooleanHolder class with volatile boolean