Implementing A Thread Pool (Cont.) /* the 'main' function. */ int main() { int num_threads = 10; pthread_t threads[10]; struct requests_queue* q = q_init(); int i; int pool_exit = 0; /* create the handler threads */ for (i=0; ithread_id = i; pdata->q = q; pdata->should_exit = 0; pdata->pool_exit = &pool_exit; pthread_create(&threads[i], NULL, handle_requests, pdata); }