-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
BUG: cKDTree GIL handling is incorrect #10514
Comments
ping @rainwoodman @rgommers |
Fortunately, fixing ckdtree.pyx is easy. I will take care of it. |
This is now fixed in #10516 |
Ah. Yes there needs to be an explicit release! Totally forgot about that.
cython claims memoryviews do not need gil. Are you sure you need to
introduce new named variables in those cdefs in and around the thread
handler function?
…On Wed, Jul 24, 2019, 9:13 PM Sturla Molden ***@***.***> wrote:
This is now fixed in #10516 <#10516>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10514?email_source=notifications&email_token=AABBWTG5M6R4CEKOKKNLFX3QBER75A5CNFSM4IGWCZM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2YJESY#issuecomment-514888267>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABBWTFOK5VVSTYW2YUZ3GTQBER75ANCNFSM4IGWCZMQ>
.
|
I am not sure. We do no use |
I also took liberty to put the STL And following this line of thought, do we really a custom C++ heap in |
But that is for another PR :) |
You shouldn't be worried, |
Good to know, one thing less to worry about :) |
I believe #9915 has introduced errors in
cKDTree
GIL handling.Declaring a C++ function
nogil
in Cython does not ensure that the GIL is automatically released and reaquired. It only declares that it is allowed to call the function in a nogil context.Releasing the GIL in Cython is accomplished with a
with nogil:
statement. There is no such statement inckdtree.pyx
. Therefore,cKDTree
does not release the GIL and all multithreading code is now defective.We must either revert #9915 to keep GIL release and exception translation in C++ or fix
ckdtree.pyx
to actually release the gil.The text was updated successfully, but these errors were encountered: