
6 Apr
2013
6 Apr
'13
10:47 p.m.
Zitat von Klaim - Joël Lamotte
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.