Skip to content

Thread Safety and Multithreading

Gerd Heber edited this page Aug 5, 2016 · 8 revisions

Because of the code-free nature of HDF.PInvoke, it is as thread-safe as the underlying native libraries.

The NuGet packages contain native DLLs that were built with thread-safety enabled.

⚠️ Currently, the binaries distributed on The HDF Group website are not built with thread-safety enabled.

⚠️ There are two functions in HDF.PInvoke, H5DO.append and H5DO.write_chunk, that are thread-safe but not atomic. This may lead to unexpected (erroneous) application behavior when invoked by two or more threads simultaneously.

It is OK to use native HDF5 DLLs for single-threaded applications or applications in which only a single thread make calls into the HDF5 library.

References