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 committed 2012-11-07 14:53:16 -06:00
1 parent 0160072adc
commit 6627dc8696
8 files changed
+42 -11

No files matched your search

+20
View File
@@ -6532,6 +6532,9 @@ char *sofia_glue_execute_sql2str(sofia_profile_t *profile, switch_mutex_t *mutex
switch_cache_db_release_db_handle(&dbh);
sofia_glue_fire_events(profile);
return ret;
}
@@ -7159,6 +7162,23 @@ void sofia_event_fire(sofia_profile_t *profile, switch_event_t **event)
*event = NULL;
}
void sofia_glue_fire_events(sofia_profile_t *profile)
{
void *pop = NULL;
while (profile->event_queue && switch_queue_trypop(profile->event_queue, &pop) == SWITCH_STATUS_SUCCESS && pop) {
switch_event_t *event = (switch_event_t *) pop;
switch_event_fire(&event);
}
}
void sofia_event_fire(sofia_profile_t *profile, switch_event_t **event)
{
switch_queue_push(profile->event_queue, *event);
*event = NULL;
}
/* For Emacs:
* Local Variables: