[asterisk-commits] file: branch 11 r396657 - in /branches/11: ./ tests/test_hashtab_thrash.c

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


Author: file
Date: Wed Aug 14 14:06:28 2013
New Revision: 396657

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

Merged revisions 396656 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/tests/test_hashtab_thrash.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/tests/test_hashtab_thrash.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/tests/test_hashtab_thrash.c?view=diff&rev=396657&r1=396656&r2=396657
==============================================================================
--- branches/11/tests/test_hashtab_thrash.c (original)
+++ branches/11/tests/test_hashtab_thrash.c Wed Aug 14 14:06:28 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