1
0
mirror of git://erdgeist.org/opentracker synced 2025-02-05 03:26:25 +00:00

Fullscrape now cleanly finalizes its thread

This commit is contained in:
erdgeist 2007-11-19 21:14:09 +00:00
parent 49ba269b9d
commit 6d09527ed8
2 changed files with 6 additions and 1 deletions

View File

@ -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 );
}

View File

@ -8,6 +8,7 @@
#include "ot_mutex.h"
void fullscrape_init( );
void fullscrape_deinit( );
void fullscrape_deliver( int64 socket, ot_tasktype tasktype );
#endif