Work around pthread_cond_destroy() and pthread_mutex_destroy() returning
EBUSY. A proper solution would be to ensure all threads are terminated.
static ngx_int_t
ngx_thread_pool_queue_destroy(ngx_thread_pool_queue_t *queue, ngx_log_t *log)
{
+#if 0
return ngx_thread_mutex_destroy(&queue->mtx, log);
+#else
+ return NGX_OK;
+#endif
}
{
/* TODO: exit threads */
+#if 0
(void) ngx_thread_cond_destroy(&tp->cond, tp->log);
+#endif
+
(void) ngx_thread_pool_queue_destroy(&tp->queue, tp->log);
}