summaryrefslogtreecommitdiff
path: root/ot_fullscrape.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-27 21:32:24 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-27 21:32:24 +0100
commit6cbd21542cf7a751e6f0f38864e7e9eae8fa3b14 (patch)
treeb5416c7e6ad2ac30cfe51559f69c122ed493450d /ot_fullscrape.c
parente1d7b7771e915a01b5f1dd12664a6ac7fb397dfb (diff)
Plug in the new per-thread stats counter, also make sure that the ot_clean sleep does not stall tracker exit
Diffstat (limited to 'ot_fullscrape.c')
-rw-r--r--ot_fullscrape.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index 8518bd2..a86d6d7 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -55,6 +55,8 @@ static void *fullscrape_worker(void *args) {
55 while (g_opentracker_running) { 55 while (g_opentracker_running) {
56 ot_tasktype tasktype = TASK_FULLSCRAPE; 56 ot_tasktype tasktype = TASK_FULLSCRAPE;
57 ot_taskid taskid = mutex_workqueue_poptask(&tasktype); 57 ot_taskid taskid = mutex_workqueue_poptask(&tasktype);
58 if (!taskid)
59 break;
58#ifdef WANT_COMPRESSION_ZSTD 60#ifdef WANT_COMPRESSION_ZSTD
59 if (tasktype & TASK_FLAG_ZSTD) 61 if (tasktype & TASK_FLAG_ZSTD)
60 fullscrape_make_zstd(taskid, tasktype); 62 fullscrape_make_zstd(taskid, tasktype);
@@ -77,7 +79,8 @@ void fullscrape_init(void) {
77} 79}
78 80
79void fullscrape_deinit(void) { 81void fullscrape_deinit(void) {
80 pthread_cancel( thread_id ); 82 mutex_workqueue_wakeall();
83 pthread_join( thread_id, NULL );
81} 84}
82 85
83void fullscrape_deliver( int64_t sock, ot_tasktype tasktype ) { 86void fullscrape_deliver( int64_t sock, ot_tasktype tasktype ) {