#include "log.h"
#include "metacube2.h"
-#include "mutexlock.h"
#include "state.pb.h"
#include "stream.h"
#include "util.h"
if (data_fd == -1) {
exit(1);
}
-
- pthread_mutex_init(&queued_data_mutex, nullptr);
}
Stream::~Stream()
}
suitable_starting_points.push_back(point);
}
-
- pthread_mutex_init(&queued_data_mutex, nullptr);
}
StreamProto Stream::serialize()
return;
}
- MutexLock lock(&queued_data_mutex);
+ lock_guard<mutex> lock(queued_data_mutex);
DataElement data_element;
data_element.metacube_flags = metacube_flags;
// Hold the lock for as short as possible, since add_data_raw() can possibly
// write to disk, which might disturb the input thread.
{
- MutexLock lock(&queued_data_mutex);
+ lock_guard<mutex> lock(queued_data_mutex);
if (queued_data.empty()) {
return;
}