mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
some priority queuing tweaks for performance
This commit is contained in:
@@ -1599,7 +1599,7 @@ void *SWITCH_THREAD_FUNC sofia_msg_thread_run(switch_thread_t *thread, void *obj
|
||||
msg_queue_threads++;
|
||||
switch_mutex_unlock(mod_sofia_globals.mutex);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "MSG Thread %d Started\n", my_id);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "MSG Thread %d Started\n", my_id);
|
||||
|
||||
|
||||
for(;;) {
|
||||
@@ -1612,12 +1612,13 @@ void *SWITCH_THREAD_FUNC sofia_msg_thread_run(switch_thread_t *thread, void *obj
|
||||
if (pop) {
|
||||
sofia_dispatch_event_t *de = (sofia_dispatch_event_t *) pop;
|
||||
sofia_process_dispatch_event(&de);
|
||||
switch_os_yield();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "MSG Thread Ended\n");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "MSG Thread Ended\n");
|
||||
|
||||
switch_mutex_lock(mod_sofia_globals.mutex);
|
||||
msg_queue_threads--;
|
||||
@@ -1934,6 +1935,8 @@ void sofia_event_callback(nua_event_t event,
|
||||
|
||||
if (profile->pres_type) {
|
||||
switch_cond_next();
|
||||
} else {
|
||||
switch_os_yield();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user