Use in multithreaded application #72
-
|
I'm writing some software to control data collection. I'm attempting to write out the data I collect with your crate but am running into problems from what I think is my program being multithreaded. I have a couple of data-taking threads and then a data processing thread and where the data processing occurs I open an HDF5 file and try to write. But my program quits as soon as I open the file. Is this crate usable in my environment? Or is there something I'm not aware of with how Rust works in this situation? I have tested with a normal file using std::fs and there isn't an issue there. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
|
|
Beta Was this translation helpful? Give feedback.
hdf5-cis not safe in a multithreaded environment due to e.g. global caches. In this crate all accesses tohdf5-care serialised, and the most efficient access pattern is having one thread doing reading/writing, as it sounds like you are doing. What sort of errors do you get? If the failure is silent, what signals are sent?