Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][thread] Future returning 0xfeeefeee
From: Stefan Strasser (strasser_at_[hidden])
Date: 2013-04-06 18:47:08


Zitat von Klaim - Joël Lamotte <mjklaim_at_[hidden]>:

> My current suspicion: maybe I do something wrong with the lifetime of the
> promise?
> I don't see what unfortunately.

your example is not easy to read. IIUC, after execute(), the work
queue is emptied and the last shared_ptr to struct K goes out of
scope. K contains your promise and the future associated with it is
accessed after the promise has been destroyed.
try a breakpoint in the destructor of K to make sure, I don't have tbb
installed to test.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net