Skip to content

Use single persistent reader thread in Hamilton backend#952

Merged
rickwierenga merged 2 commits intomainfrom
fix/star-single-reader-thread
Mar 22, 2026
Merged

Use single persistent reader thread in Hamilton backend#952
rickwierenga merged 2 commits intomainfrom
fix/star-single-reader-thread

Conversation

@rickwierenga
Copy link
Copy Markdown
Member

@rickwierenga rickwierenga commented Mar 22, 2026

Summary

  • Replace the spawn-on-demand/die-when-idle reading thread pattern with a single persistent daemon thread per backend lifecycle
  • Thread starts in setup(), stops cleanly in stop() via threading.Event + join()
  • Fixes threads not being joined on shutdown

Test plan

  • All 76 existing STAR backend tests pass
  • Manual test on hardware

🤖 Generated with Claude Code

rickwierenga and others added 2 commits March 21, 2026 17:13
Previously, a new reading thread was spawned each time a command was sent
and no thread was running, then died when the task list emptied. Threads
were never joined on stop(). Now a single daemon thread is started in
setup() and cleanly shut down in stop() via threading.Event + join.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rickwierenga rickwierenga merged commit 1edfd86 into main Mar 22, 2026
21 checks passed
@rickwierenga rickwierenga deleted the fix/star-single-reader-thread branch March 22, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant