mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-12-01 18:37:47 +01:00
fixed receiver deadlock bug in hdf5 file writing
This commit is contained in:
1 parent
61dcc96a2e
commit
9dc38f9053
1 file changed
+3
-2
@@ -136,7 +136,7 @@ void HDF5DataFile::CreateFile() {
|
||||
'_' + std::to_string(fileIndex) + ".h5");
|
||||
fileName = p.string();
|
||||
|
||||
std::lock_guard<std::mutex> lock(*hdf5Lib);
|
||||
std::unique_lock<std::mutex> lock(*hdf5Lib);
|
||||
|
||||
uint64_t framestosave =
|
||||
((maxFramesPerFile == 0) ? numImages : // infinite images
|
||||
@@ -207,8 +207,9 @@ void HDF5DataFile::CreateFile() {
|
||||
}
|
||||
} catch (const H5::Exception &error) {
|
||||
error.printErrorStack();
|
||||
lock.unlock(); // CloseFile() also wants the mutex --> need to unlock here
|
||||
CloseFile();
|
||||
throw RuntimeError("Could not create HDF5 handles in object " + index);
|
||||
throw RuntimeError("Could not create HDF5 handles in object " + std::to_string(index));
|
||||
}
|
||||
if (!silentMode) {
|
||||
LOG(logINFO) << "[" << udpPortNumber
|
||||
|
||||
Reference in new issue
Block a user