aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-11-07 10:30:16 +0100
committerThomas White <taw@physics.org>2022-11-08 13:42:27 +0100
commitdf3224acef436c70fd95ac1f990f4dd2a68c3206 (patch)
tree55b35988ffb2cb78d531ec569dba95d9112d789d /src/im-sandbox.h
parent6f55de63b6aa64481db0e294844f39a1ca7fffee (diff)
indexamajig: Exit only once all workers received kEndOfStream
Previously, the whole program would exit if any worker saw kEndOfStream. Unfortunately, this happens quite often, due to data starvation (too many workers for the data rate) or just general slowness. Therefore we need a more robust criterion.
Diffstat (limited to 'src/im-sandbox.h')
-rw-r--r--src/im-sandbox.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/im-sandbox.h b/src/im-sandbox.h
index 52094a3d..a6adddd5 100644
--- a/src/im-sandbox.h
+++ b/src/im-sandbox.h
@@ -69,6 +69,7 @@ struct sb_shm
char last_ev[MAX_NUM_WORKERS][MAX_EV_LEN];
char last_task[MAX_NUM_WORKERS][MAX_TASK_LEN];
int pings[MAX_NUM_WORKERS];
+ int end_of_stream[MAX_NUM_WORKERS];
time_t time_last_start[MAX_NUM_WORKERS];
int warned_long_running[MAX_NUM_WORKERS];