void threadpool_destroy(threadpool *pool) { free(pool->tids_); threadpool_stop(pool); queue_destroy(&pool->queue_); pthread_mutex_destroy(&pool->mutex_); pthread_cond_destroy(&pool->cond_); }
void threadpool_free(t_threadpool *x) { threadpool_stop(x); }
void threadpool_cancel(t_threadpool *x) { threadpool_stop(x); outlet_anything(x->x_outlet,gensym("cancelled"), 0, NULL); }