Introduce a Stopper class to encapsulate common idiom.