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

Regarding thread safety #128

Open
krestomantsi opened this issue Jan 9, 2024 · 2 comments
Open

Regarding thread safety #128

krestomantsi opened this issue Jan 9, 2024 · 2 comments

Comments

@krestomantsi
Copy link

Can someone clarify whether the thread safety corresponds to reading the same file in parallel or multiple reads from different files? Also can the read me please be updated? I did not know how to contact the organisation so I made an issue instead. I apologize if this was wrong.

@magnusuMET
Copy link
Member

Thread safety is taken care of when using the netcdf crate. You only have to worry about this when using netcdf-sys

@lnicola
Copy link
Member

lnicola commented Jan 9, 2024

Note that libnetcdf's approach to threading seems to be "everything takes a global lock" (and I've seen it crash when opening unrelated files on different threads, probably someone forgot to take that lock).

You can use threads with this crate, but don't expect an increase in throughput.

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

3 participants