Author: file
Date: Wed Aug 14 14:05:41 2013
New Revision: 396656

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396656
Log:
Tweak comment for why usleep is used.

Modified:
    branches/1.8/tests/test_hashtab_thrash.c

Modified: branches/1.8/tests/test_hashtab_thrash.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/1.8/tests/test_hashtab_thrash.c?view=diff&rev=396656&r1=396655&r2=396656
==============================================================================
--- branches/1.8/tests/test_hashtab_thrash.c (original)
+++ branches/1.8/tests/test_hashtab_thrash.c Wed Aug 14 14:05:41 2013
@@ -197,7 +197,9 @@
                ast_hashtab_end_traversal(it);
 
                if (last_count == count) {
-                       /* Allow other threads to run. */
+                       /* Give other threads ample chance to run, note that 
using sched_yield here does not
+                        * provide enough of a chance and can cause this thread 
to starve others.
+                        */
                        usleep(1);
                } else if (last_count > count) {
                        /* Make sure the hashtable never shrinks */


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to