
19 Dec
2012
19 Dec
'12
7:20 p.m.
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.
good point! will adapt the testsuite and hope this will resolve the issue ... thanks a lot!