From 6d09527ed8442e856920686bd03fa2d582da6956 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Mon, 19 Nov 2007 21:14:09 +0000 Subject: Fullscrape now cleanly finalizes its thread --- ot_fullscrape.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ot_fullscrape.c') diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 6f898c4..bcf238c 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c @@ -52,11 +52,15 @@ static void * fullscrape_worker( void * args) { return NULL; } +static pthread_t thread_id; void fullscrape_init( ) { - pthread_t thread_id; pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); } +void fullscrape_deinit( ) { + pthread_cancel( thread_id ); +} + void fullscrape_deliver( int64 socket, ot_tasktype tasktype ) { mutex_workqueue_pushtask( socket, tasktype ); } -- cgit v1.2.3