[issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError

Charles-Francois Natali report at bugs.python.org
Wed Apr 27 17:37:27 CEST 2011


Charles-Francois Natali <neologix at free.fr> added the comment:

The most obvious explanation for that failure is that the barrier's timeout is too low.

   def test_default_timeout(self):
       """
       Test the barrier's default timeout
       """
       #create a barrier with a low default timeout
       barrier = self.barriertype(self.N, timeout=0.1)

If the last thread waits on the barrier more than 0.1s after the first thread, then you'll get a BrokenBarrierError.
A 0.1s delay is not that much, 100ms was the default quantum with Linux O(1) scheduler...

----------
nosy: +neologix

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11871>
_______________________________________


More information about the Python-bugs-list mailing list