netcdf
netcdf copied to clipboard
Regarding thread safety
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.
Thread safety is taken care of when using the netcdf
crate. You only have to worry about this when using netcdf-sys
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.