Beispiel #1
0
    lcos::unique_future<std::vector<Future> >
    when_all(std::vector<Future>& lazy_values,
        error_code& ec = throws)
    {
        typedef std::vector<Future> result_type;

        if (lazy_values.empty())
            return lcos::make_ready_future(result_type());

        return when_n(lazy_values.size(), lazy_values, ec);
    }
Beispiel #2
0
 std::vector<HPX_STD_TUPLE<int, lcos::future<T> > >
 wait_n(std::size_t n, lcos::future<T> f0 , lcos::future<T> f1 , lcos::future<T> f2,
     error_code& ec = throws)
 {
     typedef std::vector<HPX_STD_TUPLE<int, lcos::future<T> > > result_type;
     lcos::future<result_type> f = when_n(
         f0 , f1 , f2);
     if (!f.valid()) {
         { if (&ec == &hpx::throws) { HPX_THROW_EXCEPTION( uninitialized_value, "lcos::wait_n", "lcos::when_n didn't return a valid future"); } else { ec = make_error_code(static_cast<hpx::error>( uninitialized_value), "lcos::when_n didn't return a valid future", "lcos::wait_n", "D:/Devel\\hpx\\hpx\\lcos\\wait_n.hpp", 386, (ec.category() == hpx::get_lightweight_hpx_category()) ? hpx::lightweight : hpx::plain); } };
         return result_type();
     }
     return f.get(ec);
 }
Beispiel #3
0
std::vector<HPX_STD_TUPLE<int, lcos::future<T> > >
wait_n(std::size_t n, lcos::future<T> f0 , lcos::future<T> f1 , lcos::future<T> f2)
{
    typedef std::vector<HPX_STD_TUPLE<int, lcos::future<T> > > result_type;
    lcos::future<result_type> f = when_n(
                                      f0 , f1 , f2);
    if (!f.valid()) {
        HPX_THROW_EXCEPTION(uninitialized_value, "lcos::wait_n",
                            "lcos::when_n didn't return a valid future");
        return result_type();
    }
    return f.get();
}
Beispiel #4
0
 lcos::future<HPX_STD_TUPLE<lcos::future<R0> , lcos::future<R1> , lcos::future<R2> , lcos::future<R3> > >
 when_all(lcos::future<R0> f0 , lcos::future<R1> f1 , lcos::future<R2> f2 , lcos::future<R3> f3,
     error_code& ec = throws)
 {
     return when_n(4, f0 , f1 , f2 , f3, ec);
 }
Beispiel #5
0
 lcos::future<HPX_STD_TUPLE<lcos::future<R0> , lcos::future<R1> > >
 when_all(lcos::future<R0> f0 , lcos::future<R1> f1,
     error_code& ec = throws)
 {
     return when_n(2, f0 , f1, ec);
 }
Beispiel #6
0
 lcos::future<HPX_STD_TUPLE<lcos::future<R0> , lcos::future<R1> , lcos::future<R2> , lcos::future<R3> , lcos::future<R4> , lcos::future<R5> , lcos::future<R6> , lcos::future<R7> > >
 when_all(lcos::future<R0> f0 , lcos::future<R1> f1 , lcos::future<R2> f2 , lcos::future<R3> f3 , lcos::future<R4> f4 , lcos::future<R5> f5 , lcos::future<R6> f6 , lcos::future<R7> f7,
     error_code& ec = throws)
 {
     return when_n(8, f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7, ec);
 }
Beispiel #7
0
 lcos::future<HPX_STD_TUPLE<lcos::future<R0> > >
 when_all(lcos::future<R0> f0,
     error_code& ec = throws)
 {
     return when_n(1, f0, ec);
 }