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

Release GIL during resampling #13

Open
richardsheridan opened this issue Jan 25, 2024 · 1 comment · May be fixed by #14
Open

Release GIL during resampling #13

richardsheridan opened this issue Jan 25, 2024 · 1 comment · May be fixed by #14

Comments

@richardsheridan
Copy link

CFFI implicitly released the GIL by default when calling into libsamplerate, whereas pybind11 keeps the GIL by default. This change in 0.2.0+ leads to major GIL contention in a application where I was successfully getting thread-based parallelism before.

I don't have much experience with pybind11 but it seems {py::gil_scoped_release release; ...} blocks will be needed around calls to src_simple and others.

tuxu added a commit that referenced this issue Jan 25, 2024
@tuxu tuxu linked a pull request Jan 25, 2024 that will close this issue
@tuxu
Copy link
Owner

tuxu commented Jan 25, 2024

Very good point and definitely an oversight. Would you mind giving PR #14 a try?

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

Successfully merging a pull request may close this issue.

2 participants