|
Boost : |
Subject: Re: [boost] [atomic, x86] need another pair of eyes
From: Peter Dimov (lists_at_[hidden])
Date: 2012-12-19 14:02:01
Tim Blechmann wrote:
> >>> Which tests fail, by the way?
> >> >
> >> > the stress test for the spsp_queue (spsc_queue_test_caching) ... one
> >> > thread enqueueing a large number of elements, one thread dequeueing
> >> > ...
> > Yes but how? Which BOOST_REQUIRE fails, and what does it say?
>
> some elements are lost ... the receiver reads less elements than the
> sender enqueues:
> BOOST_REQUIRE_EQUAL(received_nodes, nodes_per_thread);
I think that this is a possible and legitimate outcome of your test. Nothing
guarantees that the receiver will see the last batch of elements before
seeing running = false. You have to set running = false from the writer
thread for that to be guaranteed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk