def abort(self, msg=None):
if not self.abort_run.is_set():<EOL><INDENT>if msg:<EOL><INDENT>logging.error('<STR_LIT>', msg, ('<STR_LIT>' if msg[-<NUM_LIT:1>] in punctuation else '<STR_LIT:.>'))<EOL><DEDENT>else:<EOL><INDENT>logging.error('<STR_LIT>')<EOL><DEDENT><DEDENT>self.abort_run.set()<EOL>self.stop_run.set()<EOL>
Aborting a run. Control for loops. Immediate stop/abort.

        The implementation should stop a run ASAP when this event is set. The run is considered incomplete.