[asterisk-commits] file: branch 11 r396620 - in /branches/11: ./ tests/test_hashtab_thrash.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 14 13:08:29 CDT 2013
Author: file
Date: Wed Aug 14 13:08:27 2013
New Revision: 396620
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396620
Log:
Tweak test_hashtab_thrash test to allow the critical threads to execute.
Depending on certain conditions it was possible for the hashtab counting thread
to starve other threads, preventing them from executing in the expected fashion.
This change adds a sleep to allow the others to do what they need to do. While
this doesn't thrash the hashtab as much as previously, it at least works.
(closes issue ASTERISK-22276)
Reported by: Matt Jordan
........
Merged revisions 396619 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=396620&r1=396619&r2=396620
==============================================================================
--- branches/11/tests/test_hashtab_thrash.c (original)
+++ branches/11/tests/test_hashtab_thrash.c Wed Aug 14 13:08:27 2013
@@ -198,7 +198,7 @@
if (last_count == count) {
/* Allow other threads to run. */
- sched_yield();
+ usleep(1);
} else if (last_count > count) {
/* Make sure the hashtable never shrinks */
return "hashtab unexpectedly shrank";
More information about the asterisk-commits
mailing list