Get a response from the child process.
(self)
| 172 | self.request_queue.put(obj) |
| 173 | |
| 174 | def get(self) -> Any: |
| 175 | """ |
| 176 | Get a response from the child process. |
| 177 | """ |
| 178 | assert self.process is not None |
| 179 | assert self.response_queue is not None |
| 180 | while True: |
| 181 | try: |
| 182 | return self.response_queue.get(timeout=1.0) |
| 183 | except queue.Empty: |
| 184 | status = self.process.exitcode |
| 185 | if status is None: |
| 186 | # child process is still running |
| 187 | continue |
| 188 | # child process crashed |
| 189 | self.clear() |
| 190 | raise |
| 191 | |
| 192 | def terminate(self) -> None: |
| 193 | """ |
no test coverage detected