[concurrency-interest] ThreadPoolExecutorTest occasionallyfails with a broken barrier!?
pfeiffer at tzi.de
Thu Feb 15 04:32:30 EST 2007
> You're reusing the same thread pool for each repeat of the test,
> right? (It appears to be statically initialized once for the test
> class.) I suspect that occasionally one (or more) of the pooled tasks
> from a previous test run have not fully completed as far as the thread
> pool is concerned, so during the next test run, the main loop gets
> blocked on a iteration earlier than the 17th, and then a barrier await
> times out because the main loop cannot submit the 17th task, which
> breaks the barrier.
Even if I didn't test it, I'm absolutely sure that this is the problem!
Thanks for exposing!
More information about the Concurrency-interest