Merge branch 'zmq-close-30s' into rc175: receivers wait 30 s (was 10 s) for the pusher to finalise its sends at the end of a collection
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
7ff2a55d65
3 files changed
+11
-6
No files matched your search
@@ -46,6 +46,9 @@ protected:
|
||||
std::chrono::time_point<std::chrono::system_clock> start_time;
|
||||
std::chrono::time_point<std::chrono::system_clock> end_time;
|
||||
|
||||
// After END, how long the image pusher may take to return every image buffer it still holds
|
||||
constexpr static auto SendFinalizeTimeout = std::chrono::seconds(30);
|
||||
|
||||
int64_t max_image_number_sent = 0;
|
||||
std::mutex max_image_number_sent_mutex;
|
||||
void UpdateMaxImageSent(int64_t image_number);
|
||||
|
||||
@@ -615,9 +615,10 @@ void JFJochReceiverFPGA::FinalizeMeasurement() {
|
||||
|
||||
logger.Info("Devices stopped");
|
||||
|
||||
if (!image_buffer.CheckIfBufferReturned(std::chrono::seconds(10))) {
|
||||
logger.Error("Send commands not finalized in 10 seconds");
|
||||
throw JFJochException(JFJochExceptionCategory::ZeroMQ, "Send commands not finalized in 10 seconds");
|
||||
if (!image_buffer.CheckIfBufferReturned(SendFinalizeTimeout)) {
|
||||
logger.Error("Send commands not finalized in {} seconds", SendFinalizeTimeout.count());
|
||||
throw JFJochException(JFJochExceptionCategory::ZeroMQ, "Send commands not finalized in "
|
||||
+ std::to_string(SendFinalizeTimeout.count()) + " seconds");
|
||||
}
|
||||
logger.Info("Receiving data done");
|
||||
|
||||
|
||||
@@ -185,9 +185,10 @@ void JFJochReceiverLite::MeasurementThread() {
|
||||
// Send end message out
|
||||
SendEndMessage();
|
||||
|
||||
if (!image_buffer.CheckIfBufferReturned(std::chrono::seconds(10))) {
|
||||
logger.Error("Send commands not finalized in 10 seconds");
|
||||
throw JFJochException(JFJochExceptionCategory::ZeroMQ, "Send commands not finalized in 10 seconds");
|
||||
if (!image_buffer.CheckIfBufferReturned(SendFinalizeTimeout)) {
|
||||
logger.Error("Send commands not finalized in {} seconds", SendFinalizeTimeout.count());
|
||||
throw JFJochException(JFJochExceptionCategory::ZeroMQ, "Send commands not finalized in "
|
||||
+ std::to_string(SendFinalizeTimeout.count()) + " seconds");
|
||||
}
|
||||
|
||||
logger.Info("All images sent through ZeroMQ");
|
||||
|
||||
Reference in new issue
Block a user