Skip to content

Commit f7b8730

Browse files
committed
Making safe_get safer
1 parent c53635d commit f7b8730

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

giskard/utils/worker_pool.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def safe_get(self, queue: Queue, timeout: float = 1) -> Tuple[Any, bool]:
189189
result = queue.get(timeout=timeout)
190190
except Empty:
191191
result = None
192-
except ValueError as e:
192+
except (ValueError, OSError) as e:
193193
# If queue is closed
194194
if not self.terminated():
195195
LOGGER.error("Queue is closed, and executor not in final state")
@@ -387,6 +387,3 @@ def _killer_thread(
387387

388388
if exception is not None:
389389
raise exception
390-
391-
if executor.terminated():
392-
return

0 commit comments

Comments
 (0)