isc_thread_t thread;
unsigned int threadid;
isc__taskmgr_t *manager;
+ uint64_t eprocessed;
};
struct isc__taskmgr {
* have a task to do. We must reacquire the queue
* lock before exiting the 'if (task != NULL)' block.
*/
+ manager->queues[threadid].eprocessed++;
UNLOCK(&manager->queues[threadid].lock);
RUNTIME_CHECK(
atomic_fetch_sub_explicit(&manager->tasks_ready,
manager->queues[i].manager = manager;
manager->queues[i].threadid = i;
+ manager->queues[i].eprocessed = 0;
isc_thread_create(run, &manager->queues[i],
&manager->queues[i].thread);
char name[21];
*/
wake_all_queues(manager);
UNLOCK(&manager->lock);
-
+ FILE * f = fopen("/tmp/foobar","w");
+ for (i=0; i< manager->workers; i++) {
+ fprintf(f, "%d: %lu\n", i, manager->queues[i].eprocessed);
+ }
+ fclose(f);
/*
* Wait for all the worker threads to exit.
*/