FPGAImagePuller: a silent end stops the cards and still delivers what they have

The broker ends every run with a silent cancel once the detector is done
(JFJochServices -> JFJochReceiverService::Cancel(true)). With every image
now waiting for the receiver, a full cancel there would cut the images still
on their way. StopCards() stops the cards and lets what they hold through,
then the end message; Cancel() is StopCards() plus "the receiver takes no
more images". The service uses StopCards() for a silent cancel and Cancel()
otherwise. Stop() still cancels first, for a receiver that ended on an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HVeDQrPqZ52Tp6rzzZGxf3
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-11-18 19:53:42 +01:00
1 parent 83fa6daa2f
commit 472759ee0b
1 file changed
+4 -1
+4 -1
View File
@@ -241,7 +241,10 @@ void JFJochReceiverService::Cancel(bool silent) {
std::unique_lock ul(state_mutex);
if (state == ReceiverState::Running) {
receiver->Cancel(silent);
if (fpga_puller)
// Silent: the detector has finished, and what the cards have got still goes to the receiver
if (fpga_puller && silent)
fpga_puller->StopCards();
else if (fpga_puller)
fpga_puller->Cancel();
}
}