cache session threads and reuse them if possible

This commit is contained in:
Anthony Minessale
2012-08-21 00:14:43 -05:00
parent b6f64dc1c2
commit 142c051d68
7 changed files with 176 additions and 6 deletions

View File

@@ -1440,6 +1440,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
switch_set_flag((&runtime), SCF_AUTO_SCHEMAS);
switch_set_flag((&runtime), SCF_CLEAR_SQL);
switch_set_flag((&runtime), SCF_API_EXPANSION);
switch_set_flag((&runtime), SCF_SESSION_THREAD_POOL);
#ifdef WIN32
switch_set_flag((&runtime), SCF_THREADED_SYSTEM_EXEC);
#endif
@@ -1751,6 +1752,12 @@ static void switch_load_core_config(const char *file)
} else {
switch_clear_flag((&runtime), SCF_AUTO_SCHEMAS);
}
} else if (!strcasecmp(var, "session-thread-pool")) {
if (switch_true(val)) {
switch_set_flag((&runtime), SCF_SESSION_THREAD_POOL);
} else {
switch_clear_flag((&runtime), SCF_SESSION_THREAD_POOL);
}
} else if (!strcasecmp(var, "auto-clear-sql")) {
if (switch_true(val)) {
switch_set_flag((&runtime), SCF_CLEAR_SQL);