From: Joshua Colp Date: Wed, 14 Aug 2013 19:06:28 +0000 (+0000) Subject: Tweak comment for why usleep is used. X-Git-Tag: 11.6.0-rc1~3^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12c855af79096253c6f2730a021659786d23d7d8;p=thirdparty%2Fasterisk.git Tweak comment for why usleep is used. ........ Merged revisions 396656 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396657 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/tests/test_hashtab_thrash.c b/tests/test_hashtab_thrash.c index 2c135956e0..53601309b8 100644 --- a/tests/test_hashtab_thrash.c +++ b/tests/test_hashtab_thrash.c @@ -197,7 +197,9 @@ static void *hash_test_count(void *d) 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 */