Source/Backend/thread_pool/gtr_thread_pool.c
void thread_pool_wait(gtr_thread_pool *thread_pool_p) {
    pthread_mutex_lock(&thread_pool_p->thread_count_lock);
    while (thread_pool_p->job_queue.length || thread_pool_p->num_threads_working) {
        pthread_cond_wait(&thread_pool_p->threads_all_idle, &thread_pool_p->thread_count_lock);
    }
    pthread_mutex_unlock(&thread_pool_p->thread_count_lock);
}
/* Wait until all jobs have finished */
Wait until all jobs have finished
Wait until all jobs have finished
void thread_pool_wait(gtr_thread_pool *thread_pool_p) {
    pthread_mutex_lock(&thread_pool_p->thread_count_lock);
    while (thread_pool_p->job_queue.length || thread_pool_p->num_threads_working) {
        pthread_cond_wait(&thread_pool_p->threads_all_idle, &thread_pool_p->thread_count_lock);
    }
    pthread_mutex_unlock(&thread_pool_p->thread_count_lock);
}
void thread_pool_wait ( gtr_thread_pool * thread_pool_p ) { pthread_mutex_lock ( & thread_pool_p -> thread_count_lock ) ; while ( thread_pool_p -> job_queue . length || thread_pool_p -> num_threads_working ) { pthread_cond_wait ( & thread_pool_p -> threads_all_idle , & thread_pool_p -> thread_count_lock ) ; } pthread_mutex_unlock ( & thread_pool_p -> thread_count_lock ) ; }
Wait until all jobs have finished
Wait until all jobs have finished