Fix cluster loss on ClusterFinderMT shutdown

collect() cached queue emptiness across sweeps, so a worker's last
write could land after the final sweep but before shutdown was
observed, stranding that frame's clusters. Read the stop flags before
sweeping instead: once workers are joined, a sweep that moves nothing
proves the queues are drained.

Found via ClusterFinderCUDA.ipynb's drift plot, which jumped by one
frame's worth of clusters at the very end.
This commit is contained in:
kferjaoui committed 2026-09-03 17:26:47 +02:00
1 parent 7870ccfc32
commit f4bbbc9c76
2 files changed
+612 -591

No files matched your search

File diff suppressed because it is too large. Load diff