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"; -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
