Skip to content

🪲 BUG-#131: Fix timeout thread leak in ThreadPoolExecutor#166

Merged
FernandoCelmer merged 3 commits intodevelopfrom
feature/131
Apr 7, 2026
Merged

🪲 BUG-#131: Fix timeout thread leak in ThreadPoolExecutor#166
FernandoCelmer merged 3 commits intodevelopfrom
feature/131

Conversation

@FernandoCelmer
Copy link
Copy Markdown
Member

Description

  • dotflow/core/action.py — Replace with ThreadPoolExecutor context manager with explicit shutdown(wait=False, cancel_futures=True) on timeout

Motivation and Context

When future.result(timeout=...) raises TimeoutError, the with block calls executor.shutdown(wait=True) which blocks until the thread finishes. If the thread is stuck, the entire workflow hangs. The fix uses shutdown(wait=False, cancel_futures=True) to release resources without blocking.

Closes #131

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature (change which adds functionality)
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer FernandoCelmer added the bug Something isn't working label Apr 7, 2026
@FernandoCelmer FernandoCelmer merged commit 6152a07 into develop Apr 7, 2026
10 checks passed
@FernandoCelmer FernandoCelmer deleted the feature/131 branch April 7, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant