220 4551 <CAPXezF-CetHBMQBWNeNFmAVvn159g9iwaK60WLBN7mW8+ZAjHw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Fernando Cacciola <fernando.cacciola@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: N3558 :A standardized representation of
 Asynchronous operation
Date: Fri, 24 May 2013 16:46:58 -0300
Lines: 140
Approved: news@gmane.org
Message-ID: <CAPXezF-CetHBMQBWNeNFmAVvn159g9iwaK60WLBN7mW8+ZAjHw@mail.gmail.com>
References: <519F9E48.7050700@wanadoo.fr> <c959abc7-55a0-4a6a-9b20-9752cbe63af0@isocpp.org>
 <519FB94F.7090703@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c34f4043fb9004dd7c1208
X-Trace: ger.gmane.org 1369424860 17360 80.91.229.3 (24 May 2013 19:47:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 24 May 2013 19:47:40 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCOPV7FAXQPRBXEH76GAKGQEHSN6UIY@isocpp.org Fri May 24 21:47:41 2013
Return-path: <std-proposals+bncBCOPV7FAXQPRBXEH76GAKGQEHSN6UIY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCOPV7FAXQPRBXEH76GAKGQEHSN6UIY@isocpp.org>)
	id 1Ufxxl-0000TX-Fw
	for gclcip-std-proposals@m.gmane.org; Fri, 24 May 2013 21:47:41 +0200
Original-Received: by mail-wi0-f200.google.com with SMTP id c10sf143041wiw.11
        for <gclcip-std-proposals@m.gmane.org>; Fri, 24 May 2013 12:47:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-beenthere:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=D5u8Y/9R7hBCx1oa1LlaVVPrGTEOxnmsfOph6016RSo=;
        b=Z+fzKAnq5ut5gnpz89kLJMv9VRTZ14gKfYcafbeMrEm2llnqmaY3CFUBBeIumaO6ZN
         HhpDrWDHVFzASxxsUHPZ6cv5BNuhbrJL5TXzUp6Ti/kpiWILdAC70I1U/o03ffOQeXem
         sU7G3/A8tVZtjxINAQPggECjbhZLbuoWgZgR7i6zZnVsx0kK+Y526ldJ5fLUDPCY1u5G
         zzpdZyowx9vWt6aR60VJRK/FmafSlcZB7XVg8IErxuYKImcI5PKILFM4aFqGjP4MmkH+
         f/yRQaMRQstBZP4N0jQlVsj3hW4IyVWDf5jqAQCuKyGopxKnFo2scApzvJIEk4rNoacb
         +HpA==
X-Received: by 10.112.154.41 with SMTP id vl9mr3381621lbb.19.1369424860788;
        Fri, 24 May 2013 12:47:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.2.65 with SMTP id 1ls135504las.33.gmail; Fri, 24 May 2013
 12:47:39 -0700 (PDT)
X-Received: by 10.112.158.131 with SMTP id wu3mr2351695lbb.116.1369424859145;
        Fri, 24 May 2013 12:47:39 -0700 (PDT)
Original-Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174])
        by mx.google.com with ESMTPS id q7si5951174laq.185.2013.05.24.12.47.39
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 24 May 2013 12:47:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of fernando.cacciola@gmail.com designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174;
Original-Received: by mail-lb0-f174.google.com with SMTP id u10so4987462lbi.5
        for <std-proposals@isocpp.org>; Fri, 24 May 2013 12:47:39 -0700 (PDT)
X-Received: by 10.152.87.69 with SMTP id v5mr9721914laz.24.1369424858968; Fri,
 24 May 2013 12:47:38 -0700 (PDT)
Original-Received: by 10.114.96.200 with HTTP; Fri, 24 May 2013 12:46:58 -0700 (PDT)
In-Reply-To: <519FB94F.7090703@wanadoo.fr>
X-Original-Sender: fernando.cacciola@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of fernando.cacciola@gmail.com designates 209.85.217.174 as permitted
 sender) smtp.mail=fernando.cacciola@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4551
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4551>

--001a11c34f4043fb9004dd7c1208
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, May 24, 2013 at 4:02 PM, Vicente J. Botet Escriba <
vicente.botet@wanadoo.fr> wrote:

>  Le 24/05/13 19:57, Xeo a =E9crit :
>
> On Friday, May 24, 2013 7:07:20 PM UTC+2, Vicente J. Botet Escriba wrote:
>>
>>  Hi,
>>
>> What is the rationale for when_all to return future<vector<future<R>>>
>> instead of  future<vector<R>>?
>>
>  What is the rationale for when_any to return future<vector<future<R>>>
>> instead of future<pair<size_t, R>> ?
>>
>
> Likely, proper exception propagation for both.
>
> Oh, I see. No body has the need to get just: the vector of values when no
> exception has been thrown or an exception when at least one exception has
> been thrown?
>
>  For `when_any`, it's also important that you get access to *all* passed
> futures, not just the one that finished - this way, you don't have to kee=
p
> the vector around yourself.
>
>  I understand what this solves. The drawback is that we need to to iterat=
e
> over the vector of futures when the when_any function could know about th=
e
> index of the future on the vector.
> Returning future<pair<size_t, vector<future<R>>>> would provide efficienc=
y
> and safety.
>
> What if you had more than one simultaneous result?


--=20
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.



--001a11c34f4043fb9004dd7c1208
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On F=
ri, May 24, 2013 at 4:02 PM, Vicente J. Botet Escriba <span dir=3D"ltr">&lt=
;<a href=3D"mailto:vicente.botet@wanadoo.fr" target=3D"_blank">vicente.bote=
t@wanadoo.fr</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div>Le 24/05/13 19:57, Xeo a =E9crit=A0:<br>
    </div><div class=3D"im">
    <blockquote type=3D"cite">On Friday, May 24, 2013 7:07:20 PM UTC+2, Vic=
ente J.
      Botet Escriba wrote:
      <blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex">
        <div> Hi, <br>
          <br>
          What is the rationale for when_all to return
          future&lt;vector&lt;future&lt;R&gt;&gt;&gt; instead of=A0
          future&lt;vector&lt;R&gt;&gt;?<br>
        </div>
      </blockquote>
      <blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex">
        <div bgcolor=3D"#FFFFFF" text=3D"#000000"> What is the rationale fo=
r
          when_any to return future&lt;vector&lt;future&lt;R&gt;&gt;&gt;
          instead of future&lt;pair&lt;size_t, R&gt;&gt; ? <br>
        </div>
      </blockquote>
      <div><br>
        Likely, proper exception propagation for both. </div>
    </blockquote></div>
    Oh, I see. No body has the need to get just: the vector of values
    when no exception has been thrown or an exception when at least one
    exception has been thrown?<div class=3D"im"><br>
    <blockquote type=3D"cite">
      <div>For `when_any`, it&#39;s also important that you get access to
        *all* passed futures, not just the one that finished - this way,
        you don&#39;t have to keep the vector around yourself.</div>
      <br>
    </blockquote></div>
    I understand what this solves. The drawback is that we need to to
    iterate over the vector of futures when the when_any function could
    know about the index of the future on the vector. <br>
    Returning future&lt;pair&lt;size_t,
    vector&lt;future&lt;R&gt;&gt;&gt;&gt; would provide efficiency and
    safety.<span class=3D"HOEnZb"><font color=3D"#888888"><br>
    <br></font></span></div></blockquote><div>What if you had more than one=
 simultaneous result?<br></div></div><br clear=3D"all"><br>-- <br>Fernando =
Cacciola<br>SciSoft Consulting, Founder<br><a href=3D"http://www.scisoft-co=
nsulting.com">http://www.scisoft-consulting.com</a>
</div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--001a11c34f4043fb9004dd7c1208--

.
