Skip to content

Catch keyboard interrupts in multi-threaded programs#434

Merged
chrisib merged 4 commits into
Allen-Synthesis:mainfrom
chrisib:threads-keyboard-interrupt
May 31, 2025
Merged

Catch keyboard interrupts in multi-threaded programs#434
chrisib merged 4 commits into
Allen-Synthesis:mainfrom
chrisib:threads-keyboard-interrupt

Conversation

@chrisib

@chrisib chrisib commented May 7, 2025

Copy link
Copy Markdown
Collaborator

When debugging, if the program is multi-threaded, the background thread will continue after pressing ctrl + C. If we add an is_running flag and set it to False when we catch a KeyboardInterrupt we can exit the thread loops, preventing the secondary core from becoming blocked.

@chrisib chrisib added documentation Improvements or additions to documentation improvement Improvement or optimization of an existing feature or script labels May 7, 2025
@chrisib chrisib mentioned this pull request May 14, 2025
7 tasks
@chrisib chrisib merged commit 9af7dd2 into Allen-Synthesis:main May 31, 2025
3 checks passed
@chrisib chrisib deleted the threads-keyboard-interrupt branch May 31, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation improvement Improvement or optimization of an existing feature or script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant