On 3 Jan 2015 at 7:15, Hartmut Kaiser wrote:
First of all, I fully support Thomas here. Futures (and the extensions proposed in the 'Concurrency TS') are a wonderful concept allowing asynchronous computation. Those go beyond 'classical' futures, which just represent a result which has not computed yet. These futures allow for continuation style coding as you can attach continuations and compose new futures based on logical operations on others. They are also severely limited and limiting:
1. They tie your code into "future islands" which are fundamentally incommensurate with all code which doesn't use the same future as your code. Try mixing code using boost::future and std::future for example, it's a nightmare of too easy to be racy and unmaintainable mess code. If Compute provided a boost::compute::future, it would yet another new future island, and I'm not sure that's wise design. I absolutely agree. "future islands" are a big problem which need a solution very soon. To some extent the shared state as described in the standard could be the interface to be used by the different islands. What we miss here is a
On Sunday, January 04, 2015 06:52:41 Niall Douglas wrote: properly defined interface etc.. I probably didn't make that clear enough in my initial mail, but i think this unifying future interface should be the way forward so that different domains can use this to implement their islands. Hi Thomas. Can you share your ideas of what this unifying future interface could be? are you thinking on a dynamic or parametric (static) polymorphism? What is the minimal interface of a Future that allows to build higher and efficient abstraction on top of it? FWIW, we already have that in HPX and we are currently integrating OpenCL events within our "future island", this works exceptionally well. I've no doubt you have reached a good integration on your island. The
Le 04/01/15 11:25, Thomas Heller a écrit : main issue is how to be able to add new 'Futures' without been forced to modify existing code or making use of internals of a specific island and take advantage of other higher level mechanism based on 'Generic Futures'. Best, Vicente