deliver events with the core thread pool set events-use-dispatch=true in switch.conf.xml to use the old way

This commit is contained in:
Anthony Minessale
2013-09-05 03:42:35 +05:00
parent 44b01bee6b
commit a5f2176ea4
5 changed files with 79 additions and 24 deletions

View File

@@ -1963,9 +1963,18 @@ static void switch_load_core_config(const char *file)
switch_core_min_idle_cpu(atof(val));
} else if (!strcasecmp(var, "tipping-point") && !zstr(val)) {
runtime.tipping_point = atoi(val);
} else if (!strcasecmp(var, "events-use-dispatch") && !zstr(val)) {
runtime.events_use_dispatch = 1;
} else if (!strcasecmp(var, "initial-event-threads") && !zstr(val)) {
int tmp = atoi(val);
int tmp;
if (!runtime.events_use_dispatch) {
runtime.events_use_dispatch = 1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
"Implicitly setting events-use-dispatch based on usage of this initial-event-threads parameter.\n");
}
tmp = atoi(val);
if (tmp > runtime.cpu_count / 2) {
tmp = runtime.cpu_count / 2;