static int statistics_requested_lusers = 0;
int statistics_enabled;
TIMEQ_CALLBACK(main_statistics);
+#ifdef HAVE_THREADS
+int running_threads;
+#endif
void cleanup() {
free_sockets();
destroyEvents();
queue_loop();
}
+ running_threads--;
return NULL;
}
#endif
pthread_t tid[worker_threads];
int tid_id = 0;
for(tid_id = 0; tid_id < worker_threads; tid_id++) {
+ running_threads++;
pthread_create(&tid[tid_id], NULL, thread_main, NULL);
}
for(tid_id = 0; tid_id < worker_threads; tid_id++) {
pthread_join(tid[tid_id], NULL);
}
+ running_threads = 0;
#else
time_t socket_wait;
while(running) {