pull back change from apr 1.3.0

" *) Rework the WIN32 CV code to signal the condition only if one or
     more threads are blocked on the condition variable. If no threads
     are waiting on the condition variable, nothing happens. The change
     also eliminates the thundering-herd problem of the manual-reset
     event, which (theoretically) wakes up all threads waiting on. Now
     the behavior of the CV's should be the same on Unix and win32
     platforms. PR 42305.  [Davi Arnaut]
"

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10334 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-11-11 18:35:48 +00:00
parent 236f457a63
commit c99b8fb34f
3 changed files with 94 additions and 59 deletions

View File

@@ -408,9 +408,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime)
switch_mutex_init(&TIMER_MATRIX[1].mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_thread_cond_create(&TIMER_MATRIX[1].cond, module_pool);
#ifndef WIN32
globals.use_cond_yield = globals.RUNNING == 1;
#endif
while (globals.RUNNING == 1) {
runtime.reference += STEP_MIC;