Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Interface should release the GIL when run gets called #1593

Closed
michaelbynum opened this issue Jan 25, 2024 · 9 comments · Fixed by #1886
Closed

Python Interface should release the GIL when run gets called #1593

michaelbynum opened this issue Jan 25, 2024 · 9 comments · Fixed by #1886

Comments

@michaelbynum
Copy link
Contributor

The GIL prevents other python threads from running. Releasing it when run is called (and grabbing it again at the end of run) will allow other threads to proceed while HiGHS is running.

@michaelbynum
Copy link
Contributor Author

Please assign me.

@Sponge-Bas
Copy link

Relatedly, HiGHS ignores keyboard interrupts. I assume that this is also due to how HiGHS gets called.

@jajhall
Copy link
Member

jajhall commented Feb 23, 2024

Through highspy, I can well imagine that it does ignore keyboard interrupts

@michaelbynum
Copy link
Contributor Author

Yes, I believe releasing the GIL will also fix the keyboard interrupt issue.

@KelvinCheng5507
Copy link

Hello, may I ask whether this has been fixed? I'm sometimes experiencing similar problems. Thanks!

@michaelbynum
Copy link
Contributor Author

I did try to fix this, but my initial attempt was not successful. I'll give it another try today.

@michaelbynum
Copy link
Contributor Author

Ahh... I think I see how to fix this.

@michaelbynum
Copy link
Contributor Author

I've got the keyboard interrupt working. I'll create a PR shortly.

@galabovaa
Copy link
Contributor

Should be fixed in latest already, note, that #1942 was just merged with some significant updates. Closing this, @michaelbynum please open another issue if you run into any further problems. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants