提交 380bc2b6 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1265 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 76b63d3a
...@@ -2359,13 +2359,14 @@ static void *SWITCH_THREAD_FUNC switch_core_sql_thread(switch_thread *thread, vo ...@@ -2359,13 +2359,14 @@ static void *SWITCH_THREAD_FUNC switch_core_sql_thread(switch_thread *thread, vo
uint32_t itterations = 0; uint32_t itterations = 0;
uint8_t trans = 0; uint8_t trans = 0;
switch_time_t last_commit = switch_time_now(); switch_time_t last_commit = switch_time_now();
uint32_t work = 0, freq = 1000, target = 500, diff = 0; uint32_t freq = 1000, target = 500, diff = 0;
runtime.event_db = switch_core_db_handle(); runtime.event_db = switch_core_db_handle();
switch_queue_create(&runtime.sql_queue, SWITCH_SQL_QUEUE_LEN, runtime.memory_pool); switch_queue_create(&runtime.sql_queue, SWITCH_SQL_QUEUE_LEN, runtime.memory_pool);
for(;;) { for(;;) {
uint32_t work = 0;
if (switch_queue_trypop(runtime.sql_queue, &pop) == SWITCH_STATUS_SUCCESS) { if (switch_queue_trypop(runtime.sql_queue, &pop) == SWITCH_STATUS_SUCCESS) {
char *sql = (char *) pop; char *sql = (char *) pop;
......
...@@ -172,10 +172,10 @@ static void *SWITCH_THREAD_FUNC switch_event_thread(switch_thread *thread, void ...@@ -172,10 +172,10 @@ static void *SWITCH_THREAD_FUNC switch_event_thread(switch_thread *thread, void
any = len[1] + len[2] + len[0]; any = len[1] + len[2] + len[0];
if (!any) { if (!any) {
switch_yield(1000);
if (THREAD_RUNNING != 1) { if (THREAD_RUNNING != 1) {
break; break;
} }
switch_yield(1000);
continue; continue;
} }
...@@ -197,6 +197,8 @@ static void *SWITCH_THREAD_FUNC switch_event_thread(switch_thread *thread, void ...@@ -197,6 +197,8 @@ static void *SWITCH_THREAD_FUNC switch_event_thread(switch_thread *thread, void
THREAD_RUNNING--; THREAD_RUNNING--;
} }
} }
THREAD_RUNNING = 0; THREAD_RUNNING = 0;
return NULL; return NULL;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论