Multithreaded Programming Guide

thr_pool_wait()

Wait for all queued jobs to complete in the thread pool.

void  thr_pool_wait(thr_pool_t *pool);

pool is a thread pool identifier that is returned from thr_pool_create().