Method to be run in sub-process.
(self)
| 30 | self.parent_conn, self.child_conn = multiprocessing.Pipe() |
| 31 | |
| 32 | def run(self): |
| 33 | """Method to be run in sub-process.""" |
| 34 | result = ProcessResult() |
| 35 | try: |
| 36 | if self._target: |
| 37 | result.return_value = self._target(*self._args, **self._kwargs) |
| 38 | except Exception as e: |
| 39 | result.exception = e |
| 40 | raise |
| 41 | finally: |
| 42 | self.child_conn.send(result) |
| 43 | |
| 44 | def result(self): |
| 45 | """Get the result from the child process. |
no test coverage detected