Skip to content

Conversation

@FabianHofmann
Copy link
Collaborator

When solving with HiGHS (highspy), interrupting Python via Ctrl-C could leave the underlying solver running. This PR runs Highs.run() in a worker thread so the main thread can catch KeyboardInterrupt and signal cancelSolve().

  • Fix: linopy/solvers.py
  • Test: test/test_highs_keyboard_interrupt.py

Run HiGHS in a worker thread so the main thread can catch KeyboardInterrupt and signal cancelSolve(), preventing orphaned/continuing solves.
@FabianHofmann
Copy link
Collaborator Author

@euronion I think I remember you had an issue here? hope this will fix it

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.

2 participants