On Sun, Apr 7, 2013 at 12:18 AM, Klaim - Joël Lamotte
However the same change in a real code using WorkQueue internally and using similar code to the test makes the future::get() provide invalid pointers with values close to 0x000000 but not exactly. This code then makes access violation as the pointers are obviously not valid.
Ok I found that my "real code" is actually buggy and indeed provide a wrong
pointer (for a reason I'll have to hunt).
So don't bother, std::future/promise does work with my test and real code
using WorkQueue/tbb::concurrent_queue
but boost::future/promise doesnt.
I also simplified the test (and real) code for clarity, it should be
equivalent to the code from my first post:
int TRUC = 42;
TEST( Test_WorkQueue, future_promise_shared_work )
{
WorkQueue work_queue;
auto do_some_work = [&]()-> std::future