void uv__platform_loop_delete(uv_loop_t* loop) { QUEUE* item; uv__cf_loop_signal_t* s; assert(loop->cf_loop != NULL); uv__cf_loop_signal(loop, NULL, NULL); uv_thread_join(&loop->cf_thread); uv_sem_destroy(&loop->cf_sem); uv_mutex_destroy(&loop->cf_mutex); /* Free any remaining data */ while (!QUEUE_EMPTY(&loop->cf_signals)) { item = QUEUE_HEAD(&loop->cf_signals); s = QUEUE_DATA(item, uv__cf_loop_signal_t, member); QUEUE_REMOVE(item); free(s); } }
void uv__platform_loop_delete(uv_loop_t* loop) { ngx_queue_t* item; uv__cf_loop_signal_t* s; assert(loop->cf_loop != NULL); uv__cf_loop_signal(loop, NULL, NULL); uv_thread_join(&loop->cf_thread); uv_sem_destroy(&loop->cf_sem); uv_mutex_destroy(&loop->cf_mutex); /* Free any remaining data */ while (!ngx_queue_empty(&loop->cf_signals)) { item = ngx_queue_head(&loop->cf_signals); s = ngx_queue_data(item, uv__cf_loop_signal_t, member); ngx_queue_remove(item); free(s); } }