Let me know if you get something working.2015-01-25 16:43 GMT+08:00 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
Le 17/01/15 14:45, TONGARI J a écrit :Hi,
Hi,
The sample code is here:
https://gist.github.com/jamboree/3b8716ad1922749e77ae
The boost::future adaption code is adapted from N4286.
Tested with VS2015 preview.
If std::promise is passed, the code works fine.
Any clue why it hangs if boost::promise is passed?
I've been working on a possible fix on this branch https://github.com/boostorg/thread/tree/fix/blocking_future.
I have found a lot of issues on the current implementation and most of them are fixed now (weel at least I think so), however I have yet some issues with shared_future::then.
Please, could you give a try to this branch?
Doesn't seem to change the behavior.
That said, I'm not sure what the correct adaption code for boost::future would be, as you guys pointed out, the code extracted from N4286 isn't quite correct. And I also found other bugs in their await implementation, but I'm not sure it's relevant to this problem...
Anyway, thanks for looking into this, though I was just playing with the proposed await, not really for practical work.