mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
some priority queuing tweaks for performance
This commit is contained in:
1 parent
bf060c6396
commit
8733a2c895
7 files changed
+16
-5
No files matched your search
@@ -7748,6 +7748,7 @@ static void launch_conference_thread(conference_obj_t *conference)
|
||||
switch_set_flag_locked(conference, CFLAG_RUNNING);
|
||||
switch_threadattr_create(&thd_attr, conference->pool);
|
||||
switch_threadattr_detach_set(thd_attr, 1);
|
||||
switch_threadattr_priority_increase(thd_attr);
|
||||
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
|
||||
switch_mutex_lock(globals.hash_mutex);
|
||||
switch_mutex_unlock(globals.hash_mutex);
|
||||
|
||||
@@ -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