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

cec.init freezes when fails, suggested fix #61

Open
robbiepy opened this issue Feb 14, 2022 · 2 comments
Open

cec.init freezes when fails, suggested fix #61

robbiepy opened this issue Feb 14, 2022 · 2 comments

Comments

@robbiepy
Copy link

robbiepy commented Feb 14, 2022

The CEC adapter can only be open by one caller at any one time.

If init() is called when the adapter is already open, the current code is meant to destroy the adapter resource and then raise an exception. However, I found that the code freezes when it attempts to destroy the adapter.

CECDestroy(CEC_adapter);
CEC_adapter = NULL;

I found the following code fixed it for me:

Py_BEGIN_ALLOW_THREADS
CECDestroy(CEC_adapter);
CEC_adapter = NULL;
Py_END_ALLOW_THREADS

trainman419 pushed a commit that referenced this issue Feb 18, 2022
@trainman419
Copy link
Owner

Ok; I've pushed an updated version to help with this: 227c69b

Please give that a try and let me know if it helps.

@robbiepy
Copy link
Author

Ok; I've pushed an updated version to help with this: 227c69b

Please give that a try and let me know if it helps.

Yes that fixes it. Thank you.

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

No branches or pull requests

2 participants