fix some contention issues under really high load...That doesn't mean you need to push it this hard and bug me about it =p

This commit is contained in:
Anthony Minessale
2012-11-07 12:10:50 -06:00
parent feb38cece2
commit f60962ae87
7 changed files with 89 additions and 78 deletions
+2 -3
View File
@@ -472,7 +472,6 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping dispatch queues\n");
for(x = 0; x < (uint32_t)DISPATCH_THREAD_COUNT; x++) {
switch_queue_trypush(EVENT_DISPATCH_QUEUE, NULL);
}
@@ -487,8 +486,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
}
x = 0;
while (x < 10000 && THREAD_COUNT) {
switch_cond_next();
while (x < 100 && THREAD_COUNT) {
switch_yield(100000);
if (THREAD_COUNT == last) {
x++;
}