diff options
author | Ruslan Ermilov <ru@nginx.com> | 2015-03-19 23:20:18 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2015-03-19 23:20:18 +0300 |
commit | c34368715f9e6639f11e9c1a70272668085d6886 (patch) | |
tree | b406a61fe8bcf5a6567d8e7506ee54856bd7245d /src | |
parent | afe1fcffaae50a0b56555635c9b4debba0ee72df (diff) | |
download | nginx-c34368715f9e6639f11e9c1a70272668085d6886.tar.gz nginx-c34368715f9e6639f11e9c1a70272668085d6886.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_thread_pool.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ngx_thread_pool.c b/src/core/ngx_thread_pool.c index d6e85202f..5bc6153e0 100644 --- a/src/core/ngx_thread_pool.c +++ b/src/core/ngx_thread_pool.c @@ -172,7 +172,11 @@ ngx_thread_pool_queue_init(ngx_thread_pool_queue_t *queue, ngx_log_t *log) 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 } @@ -181,7 +185,10 @@ ngx_thread_pool_destroy(ngx_thread_pool_t *tp) { /* 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); } |