Read results from the queue and add to self.results in a thread stared by `__enter__`.
(self)
| 217 | return self.read_thread is not None or not self.queue.empty() |
| 218 | |
| 219 | def _read_thread_func(self): |
| 220 | """Read results from the queue and add to self.results in a thread stared by `__enter__`.""" |
| 221 | while self._is_parent() and self._is_thread_active(): |
| 222 | try: |
| 223 | result = self.queue.get() |
| 224 | |
| 225 | if result is None: |
| 226 | break |
| 227 | |
| 228 | self.add_result(result) |
| 229 | except Empty: |
| 230 | pass |
| 231 | |
| 232 | if not (not self._is_parent() or self.queue.empty()): |
| 233 | raise AssertionError |
| 234 | |
| 235 | def _put_result(self, name, timedelta, filename, lineno): |
| 236 | """Add a ProfileResult object to the queue.""" |
nothing calls this directly
no test coverage detected