(callable, *args, **kwargs)
| 224 | return None |
| 225 | |
| 226 | def launch_thread(callable, *args, **kwargs): |
| 227 | def capture_errors(callable, *args, **kwargs): |
| 228 | try: |
| 229 | return callable(*args, **kwargs) |
| 230 | # Errors we capture in `error_queue` will be re-raised by this thread. |
| 231 | except: # noqa: E722 |
| 232 | error_queue.put(sys.exc_info()) |
| 233 | return None |
| 234 | |
| 235 | thread = threading.Thread( |
| 236 | target=capture_errors, |
| 237 | args=( |
| 238 | callable, |
| 239 | *args, |
| 240 | ), |
| 241 | kwargs=kwargs, |
| 242 | daemon=True, |
| 243 | ) |
| 244 | thread.start() |
| 245 | return thread |
| 246 | |
| 247 | def checked_put(work_queue: queue.Queue, item: ty.Any): |
| 248 | error = None |
nothing calls this directly
no outgoing calls
no test coverage detected