def _create_process(self, process, name):
def _run():<EOL><INDENT>process.initialize()<EOL>try:<EOL><INDENT>while not self.stop_flag.is_set():<EOL><INDENT>process.loop()<EOL><DEDENT><DEDENT>except KeyboardInterrupt:<EOL><INDENT>pass<EOL><DEDENT>except:<EOL><INDENT>self._logger.exception('<STR_LIT>', name)<EOL><DEDENT><DEDENT>return self.environment.create_process(_run, name)<EOL>
Repeatedly call the `loop()` method of the given process. Unhandled
exceptions in the `loop()` method will cause the process to terminate.