openMP
dsimcha
dsimcha at yahoo.com
Thu Oct 4 15:50:44 PDT 2012
On Thursday, 4 October 2012 at 16:07:35 UTC, David Nadlinger
wrote:
> For more advanced/application-level use cases, just look at any
> use of ContinueWith in C#. std::future::then() is also proposed
> for C++, see e.g.
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3327.pdf.
>
> I didn't really read the the N3327 paper in detail, but from a
> brief look it seems to be a nice summary of what you might want
> to do with tasks/asynchronous results – I think you could
> find it an interesting read.
>
> David
Thanks for posting this. It was an incredibly useful read for
me! Given that the code I write is generally compute-intensive,
not I/O intensive, I'd never given much thought to the value of
futures in I/O intensive code before this discussion. I stand by
what I said before: Someone (not me because I'm not intimately
familiar with the use cases; you might be qualified) should write
a std.future module for Phobos that properly models the
**abstraction** of a future. It's only tangentially relevant to
std.parallelism's charter, which includes both a special case of
futures that's useful to SMP parallelism and other parallel
computing constructs. Then, we should define an adapter that
allows std.parallelism Tasks to be modeled more abstractly as
futures when necessary, once we've nailed down what the future
**abstraction** should look like.
More information about the Digitalmars-d
mailing list