NetCDF.jl icon indicating copy to clipboard operation
NetCDF.jl copied to clipboard

What to do about threads in Julia 1.3

Open meggart opened this issue 5 years ago • 0 comments

So Julia is getting a new threading model and I think packages are supposed to prepare becoming thread-safe. To my best knowledge, the NetCDF C library is not thread-safe and should not be called from several threads simultaneously, although there has been some discussion on the topic. https://www.unidata.ucar.edu/blogs/developer/entry/implementing-thread-safe-access-to

So I guess one would have to make sure that calls to any netcdf c function would be exclusive among threads by using locks from the Julia side. I think this will probably affect a lot of other wrapper packages around non-thread-safe libraries, so it might make sense to wait a bit and see solutions popping up. Just wanted to bring up the issue now, so people might reference existing solutions.

meggart avatar Aug 09 '19 07:08 meggart