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
ENH: spatial: serialize concurrent calls to QHull #20619
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too bad about the code churn but putting the lock cleanup in a finally block does make sense.
Probably worth benchmarking singlethreaded performance since acquiring an uncontested |
Great, looks like this fixes a long-standing crash in
Could you skip this test on 32-bit platforms and when not enough memory is available @andfoy? Search the code base for Also, could you add |
Thanks for the pointers! @ngoldbaum @rgommers @ev-br, I'll make sure to fix the tests and some minor lock acquisition details |
The diff with whitespace hidden looks quite clean now. Probably about ready to go once the merge conflict is resolved? |
Reference issue
Closes gh-8856
What does this implement/fix?
This PR introduces a Mutex mechanism to serialize QHull calls, thus preventing potential segfaults or undefined behaviour, since it is not thread-safe. See http://www.qhull.org/html/qh-code.htm#reentrant
Additional information
Depends on #20611