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

C API threadsafety #32

Closed
tazz4843 opened this issue Oct 9, 2022 · 5 comments
Closed

C API threadsafety #32

tazz4843 opened this issue Oct 9, 2022 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@tazz4843
Copy link
Contributor

tazz4843 commented Oct 9, 2022

I can't see any docs as to threadsafety for the C API. Information here would be very helpful for me and future users. Thanks!

@ggerganov ggerganov added the documentation Improvements or additions to documentation label Oct 9, 2022
@ggerganov
Copy link
Owner

Good point - will add information about that.

The interface is thread-safe as long as you don't use the same whisper_context in more than one thread.

@tazz4843
Copy link
Contributor Author

tazz4843 commented Oct 9, 2022

By "using in more than one thread", do you mean sending between threads and then using it, or using it concurrently from multiple threads? I'm writing Rust bindings for this lib, and I just want to be absolutely sure here.

@ggerganov
Copy link
Owner

It's ok to send it from one thread to another. The only limitation is to not use it concurrently from multiple threads.

@happysalada
Copy link

@tazz4843 did you ever write the rust bindings for the lib ? If yes, I'm interested in them!

@tazz4843
Copy link
Contributor Author

tazz4843 commented Feb 8, 2023

I did @happysalada, and you can find them over at https://github.com/tazz4843/whisper-rs

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

No branches or pull requests

3 participants