:: horsing around with the C++ programming language

async 0.2.2 released

[23rd September 2007]

In async 0.2.1, I added the ability to turn a future<> in to a future_scope allowing future<>s instantiated with different template parameters to be added to a single homogeneous container:

std::vector<async::future_scope> futs;

async::future<double> fd = async::call(cage, &func1, x, y, z);
async::future<std::string> fs = async::call(cage, &func2, a, b, c);


This is all well and good, but there was no way to get back to a future<> from a future_scope. Instead you had to resort to using Boost.Any, or something similar. In 0.2.2 this has changed.

There is now a future_cast<> function that allows you to get back to the future[1].


async::future<double> fd2 = async::future_cast<double>(futs[0]);
async::future<std::string> fs2 = async::future_cast<std::string>(futs[1]);

To find out more, head on over to the async project page.

  1. it's shameful how long it took me to work in that phrase with all my recent posts on futures []


(required, hint)

Links can be added like [this one ->], to my homepage.
Phrases and blocks of code can be enclosed in {{{triple braces}}}.
Any HTML markup will be escaped.