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

Feature Request: function for interrupting menoh_model_run() #160

Open
msakai opened this issue Oct 25, 2018 · 0 comments
Open

Feature Request: function for interrupting menoh_model_run() #160

msakai opened this issue Oct 25, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@msakai
Copy link
Member

msakai commented Oct 25, 2018

Because menoh_model_run() can take long time, it is desirable to have a function for canceling the computation from other threads.

In Ruby binding, I'm trying to release the GVL (giant VM lock, aka GIL or global interpreter lock) while executing menoh_model_run() in this PR. But doing so requires to pass a function to cancel the execution safely. If I don't pass proper function, the program will not respond for Control+C or other shutdown events. (see https://github.com/ruby/ruby/blob/v2_5_3/thread.c#L1367-L1451 for detail)

I don't know the cases of other languages with GVL (e.g CPython). But other such language may suffer the same issue.

@msakai msakai added the enhancement New feature or request label Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant