Pierre, just to keep you in the loop in case Vicente hasn't told you, I'm planning to implement most of promise/future using expected and a permit. With this I believe that it should be possible to completely avoid malloc during promise/future construction and destruction (and it's wait free if Intel TSX is available), and with that performance of promise/future ought to be hugely improved. As a useful side effect promise/future now becomes a specialisation under the general expected based monadic framework, and therefore one can freely mix and match between the two.
I expect this work to take many weeks, as it will be after work or at weekends. You can watch my progress via my fork and my CI at https://ci.nedprod.com/view/Boost%20Thread-Expected-Permit/. As you'll note, I intend to eventually contribute this new promise/future to Boost. I'll issue pull requests as I solve things - one thing I especially need to do is to port your expected implementation to VS2013, but that will be in a few weeks from now.
Pierre, just to keep you in the loop in case Vicente hasn't told you, I'm planning to implement most of promise/future using expected and a permit. With this I believe that it should be possible to completely avoid malloc during promise/future construction and destruction (and it's wait free if Intel TSX is available), and with that performance of promise/future ought to be hugely improved. As a useful side effect promise/future now becomes a specialisation under the general expected based monadic framework, and therefore one can freely mix and match between the two.
I expect this work to take many weeks, as it will be after work or at weekends. You can watch my progress via my fork and my CI at https://ci.nedprod.com/view/Boost%20Thread-Expected-Permit/. As you'll note, I intend to eventually contribute this new promise/future to Boost. I'll issue pull requests as I solve things - one thing I especially need to do is to port your expected implementation to VS2013, but that will be in a few weeks from now.
Niall