]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Tweak comment for why usleep is used.
authorJoshua Colp <jcolp@digium.com>
Wed, 14 Aug 2013 19:05:41 +0000 (19:05 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 14 Aug 2013 19:05:41 +0000 (19:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@396656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

tests/test_hashtab_thrash.c

index 2c135956e0383c6f5ea00c3c83af708d1fad53b0..53601309b8a5d74ce3c3f5f47876d7a094fe2e1a 100644 (file)
@@ -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 */