[asterisk-commits] file: branch 1.8 r396656 - /branches/1.8/tests/test_hashtab_thrash.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 14 14:05:42 CDT 2013


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 */




More information about the asterisk-commits mailing list