Leave the repeat loop when a "stop" command has been called

This is the alternative approach to #10.

I think I prefer it, although it's marginally less flexible and more verbose on the consumer side.