mirror of
https://github.com/nginx/nginx.git
synced 2025-06-28 10:10:39 +08:00
Thread pools: silence warning on process exit.
Work around pthread_cond_destroy() and pthread_mutex_destroy() returning EBUSY. A proper solution would be to ensure all threads are terminated.
This commit is contained in:
parent
afe1fcffaa
commit
c34368715f
@ -172,7 +172,11 @@ ngx_thread_pool_queue_init(ngx_thread_pool_queue_t *queue, ngx_log_t *log)
|
|||||||
static ngx_int_t
|
static ngx_int_t
|
||||||
ngx_thread_pool_queue_destroy(ngx_thread_pool_queue_t *queue, ngx_log_t *log)
|
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);
|
return ngx_thread_mutex_destroy(&queue->mtx, log);
|
||||||
|
#else
|
||||||
|
return NGX_OK;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -181,7 +185,10 @@ ngx_thread_pool_destroy(ngx_thread_pool_t *tp)
|
|||||||
{
|
{
|
||||||
/* TODO: exit threads */
|
/* TODO: exit threads */
|
||||||
|
|
||||||
|
#if 0
|
||||||
(void) ngx_thread_cond_destroy(&tp->cond, tp->log);
|
(void) ngx_thread_cond_destroy(&tp->cond, tp->log);
|
||||||
|
#endif
|
||||||
|
|
||||||
(void) ngx_thread_pool_queue_destroy(&tp->queue, tp->log);
|
(void) ngx_thread_pool_queue_destroy(&tp->queue, tp->log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user