diff --git a/receiver/host/AcquisitionDevice.cpp b/receiver/host/AcquisitionDevice.cpp index 7e0901d7..39c5b27d 100644 --- a/receiver/host/AcquisitionDevice.cpp +++ b/receiver/host/AcquisitionDevice.cpp @@ -208,7 +208,7 @@ void AcquisitionDevice::WaitForActionComplete() { void AcquisitionDevice::EndWorkRequestAndSignalQueues() { HW_SetCancelDataCollectionBit(); - work_request_queue.Put(0); // We use 0 for end of data collection - so if this is put into the queue, it will be + work_request_queue.Put(0); // 0 = end, this is to ensure that in a priority queue end marker is always first to take send_work_request_future.get(); } diff --git a/receiver/host/LinuxSocketDevice.cpp b/receiver/host/LinuxSocketDevice.cpp index d15e3445..c694893a 100644 --- a/receiver/host/LinuxSocketDevice.cpp +++ b/receiver/host/LinuxSocketDevice.cpp @@ -114,9 +114,7 @@ void LinuxSocketDevice::HW_SetCancelDataCollectionBit() { } bool LinuxSocketDevice::HW_SendWorkRequest(uint32_t handle) { - if (handle == UINT32_MAX) - HW_SetCancelDataCollectionBit(); - else + if (handle != UINT32_MAX) wr_queue.Put(ProcessWorkRequest{ .ptr = buffer_device.at(handle), .handle = handle diff --git a/receiver/host/MlxRawEthDevice.cpp b/receiver/host/MlxRawEthDevice.cpp index 8bdaaccd..1c344bd1 100644 --- a/receiver/host/MlxRawEthDevice.cpp +++ b/receiver/host/MlxRawEthDevice.cpp @@ -112,9 +112,7 @@ void MlxRawEthDevice::HW_SetCancelDataCollectionBit() { } bool MlxRawEthDevice::HW_SendWorkRequest(uint32_t handle) { - if (handle == UINT32_MAX) - HW_SetCancelDataCollectionBit(); - else + if (handle != UINT32_MAX) wr_queue.Put(ProcessWorkRequest{ .ptr = buffer_device.at(handle), .handle = handle