Maybe, there is a difference between the interface std::vector you
use in this example and your WorkQueue. Could you provide the
prototype of the functions you are using of WorkQueue?
Yes that's what I reported before: this code works until you use both boost::future/promise AND WorkQueue. I currently fixed production my code by just using std::future/promise.
I've provided the full source code of WorkQueue in my first mail. I'll re-provide it here.
It's a thin wrapper around a tbb::concurrent_queue<std::function<void()>> . (I'm using TBB 4.1 U2)
Unfortunately the only clue that I can think about is that this container don't allow move-only value-type, so maybe it's linked to the problem
but if not I have no idea.
I also reported in the tbb forum see if they can spot something but the mix makes things hard to understand.