a base class for interruptable execution