From: Anthony Minessale Date: Mon, 17 Dec 2012 17:29:09 +0000 (-0600) Subject: use interrupt_all now that it works again X-Git-Tag: v.1.3.12~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc74845461a019f3355adc61bf72cc12c77b2b5e;p=thirdparty%2Ffreeswitch.git use interrupt_all now that it works again --- diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 74dae6e68a..3a2c08bcc3 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -1667,16 +1667,7 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread_pool_manager(switch_t switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "Thread pool: running:%d busy:%d popping:%d\n", session_manager.running, session_manager.busy, session_manager.popping); - if (session_manager.popping) { - int i = 0; - - switch_mutex_lock(session_manager.mutex); - for (i = 0; i < session_manager.popping; i++) { - switch_queue_trypush(session_manager.thread_queue, NULL); - } - switch_mutex_unlock(session_manager.mutex); - - } + switch_queue_interrupt_all(session_manager.thread_queue); x--; @@ -1690,7 +1681,7 @@ static void *SWITCH_THREAD_FUNC switch_core_session_thread_pool_manager(switch_t } while(session_manager.running) { - switch_queue_trypush(session_manager.thread_queue, NULL); + switch_queue_interrupt_all(session_manager.thread_queue); switch_yield(20000); }