Skip to content

Commit

Permalink
Don't raise exceptions in FuturesExecutorMixin.__del__ (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
vachillo authored Oct 25, 2024
1 parent 587f807 commit d69d2fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `EventListener.event_types` and the argument to `BaseEventListenerDriver.handler` being out of sync.
- Models occasionally hallucinating `memory_name` and `artifact_namespace` into Tool schemas when using `ToolkitTask`.
- Models occasionally providing overly succinct final answers when using `ToolkitTask`.
- Exception getting raised in `FuturesExecutorMixin.__del__`.

## \[0.33.1\] - 2024-10-11

Expand Down
5 changes: 4 additions & 1 deletion griptape/mixins/futures_executor_mixin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import contextlib
from abc import ABC
from concurrent import futures
from typing import Callable, Optional
Expand All @@ -23,4 +24,6 @@ def __del__(self) -> None:
if executor is not None:
self.futures_executor = None

executor.shutdown(wait=True)
with contextlib.suppress(Exception):
# don't raise exceptions in __del__
executor.shutdown(wait=True)

0 comments on commit d69d2fc

Please sign in to comment.