diff options
author | Joshua Colp <jcolp@digium.com> | 2013-08-14 19:06:59 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-08-14 19:06:59 +0000 |
commit | 0f31413bca3d8eca13a0873b0abc3a930bef5a04 (patch) | |
tree | d201d99d7095e6f0cdc29c38acc6e874bad6807a /tests | |
parent | a0aa754a394ab3c71e2289458042281974706d8c (diff) |
Tweak comment for why usleep is used.
........
Merged revisions 396656 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 396657 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_hashtab_thrash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_hashtab_thrash.c b/tests/test_hashtab_thrash.c index 619090afa..14ec52b06 100644 --- a/tests/test_hashtab_thrash.c +++ b/tests/test_hashtab_thrash.c @@ -207,7 +207,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 */ |