-
Hi, When I trying to open/using the same file on 2 threads using H5Easy api Error mesage is:
HDF5 version: hdf5-1_13_2 My question is : does |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There's two options:
Personally, since HDF5 is only thread-safe, but without any concurrency, I prefer to implement the locking myself. This way I understand the locking strategy; and the STL supports easy to use mutexes. You can look into: As a side note: when opening there could be a race, if you're opening and truncating the files. |
Beta Was this translation helpful? Give feedback.
-
Hi I compiled HDF5 with thread safe but then there is no c++ support what does it means? |
Beta Was this translation helpful? Give feedback.
-
I'm sorry, it's very hard to know what you're attempting to do. Please provide a minimal example, including build instructions, etc. Please describe carefully what you expect to happen and what you've tried. I find the process of writing a precise question often answers the question itself. |
Beta Was this translation helpful? Give feedback.
There's two options:
use a thread safe build of HDF5,Personally, since HDF5 is only thread-safe, but without any concurrency, I prefer to implement the locking myself. This way I understand the locking strategy; and the STL supports easy to use mutexes.
You can look into:
https://docs.hdfgroup.org/hdf5/v1_12/_m_t.html
As a side note: when opening there could be a race, if you're opening and truncating the files.