-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Deadlock with std::function argument #1525
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
Comments
I'm still very concerned about this. Has anyone got a feeling what is going on here? If I attempted a PR, would it be accepted? |
You might check out PR #1595. That fixes a deadlock issue I was getting with functions getting called from a non-main thread. Maybe it'll fix yours? |
Thanks, I think that is tackling a different problem. I'll post on that PR. |
I've just seen #1211 has been merged, and I can confirm that the examples I give above now work correctly without deadlocking on master. Exciting! |
Issue description
I can easily reproduce a deadlock which seems to be related to
gil_scoped_acquire
andstd::function<>
arguments, when being called from a thread other than the main thread.Reproducible example code
In particular, this binding code:
Deadlocks with the following Python code:
Or also with this:
Something about two calls seems significant, I can't reproduce with just one.
I can spend some time on the weekend writing a patch if you are able to point me to what is probably going wrong :)
Thanks
David
The text was updated successfully, but these errors were encountered: