Skip to content

fix: use threading for canary module exec#294

Merged
KAJdev merged 2 commits intomainfrom
zeke/ae-2702-dev-server-docs-drop-lb-route-after-hot-reload
Mar 28, 2026
Merged

fix: use threading for canary module exec#294
KAJdev merged 2 commits intomainfrom
zeke/ae-2702-dev-server-docs-drop-lb-route-after-hot-reload

Conversation

@KAJdev
Copy link
Copy Markdown
Contributor

@KAJdev KAJdev commented Mar 28, 2026

Fixes an issue where hot reloading wasnt working during flash run. the method used (SIGALRM) does not work on Windows, nor when the thread isn't the main interpreter thread (e.g. during flash run).

This just switches to using threading instead, which works on all platforms and in any current thread. its simpler to look at too.

@KAJdev KAJdev changed the title fix: use threading for canary moduel exec fix: use threading for canary module exec Mar 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the runtime module import timeout mechanism used by the project scanner to work reliably during flash run (and on Windows) by replacing the previous signal-based approach with a thread-based timeout.

Changes:

  • Replace SIGALRM timeout handling with a daemon thread + join(timeout=...) for module import execution.
  • Update _import_module_from_file docstring to describe the new timeout strategy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KAJdev KAJdev merged commit 4d4a0df into main Mar 28, 2026
4 checks passed
@KAJdev KAJdev deleted the zeke/ae-2702-dev-server-docs-drop-lb-route-after-hot-reload branch March 28, 2026 01:09
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.

3 participants