]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use interrupt_all now that it works again
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 17 Dec 2012 17:29:09 +0000 (11:29 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 17 Dec 2012 17:29:15 +0000 (11:29 -0600)
src/switch_core_session.c

index 74dae6e68a706817ab69327c763ccb91c3fb8f9e..3a2c08bcc3b8a91c9c7cc1162cfdb574e0028dbe 100644 (file)
@@ -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);
        }