220 4554 <CAPXezF_WFhcoPHg2yW13jSt5f9NgP7veGaeSnNH3GkzvGK9eyQ@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 17:16:31 -0300
Lines: 109
Approved: news@gmane.org
Message-ID: <CAPXezF_WFhcoPHg2yW13jSt5f9NgP7veGaeSnNH3GkzvGK9eyQ@mail.gmail.com>
References: <519F9E48.7050700@wanadoo.fr> <c959abc7-55a0-4a6a-9b20-9752cbe63af0@isocpp.org>
 <519FB94F.7090703@wanadoo.fr> <CAPXezF-CetHBMQBWNeNFmAVvn159g9iwaK60WLBN7mW8+ZAjHw@mail.gmail.com>
 <CAFk2RUaTOwE-LcbOYXMRbd4hsNpdDSxUq8wFWKw-yff1_cK7ag@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=047d7bf0c5bee76d9504dd7c7b48
X-Trace: ger.gmane.org 1369426633 3087 80.91.229.3 (24 May 2013 20:17:13 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 24 May 2013 20:17:13 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCOPV7FAXQPRBSMV76GAKGQEPNIUA2Y@isocpp.org Fri May 24 22:17:14 2013
Return-path: <std-proposals+bncBCOPV7FAXQPRBSMV76GAKGQEPNIUA2Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-la0-f71.google.com ([209.85.215.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCOPV7FAXQPRBSMV76GAKGQEPNIUA2Y@isocpp.org>)
	id 1UfyQM-0002VZ-HP
	for gclcip-std-proposals@m.gmane.org; Fri, 24 May 2013 22:17:14 +0200
Original-Received: by mail-la0-f71.google.com with SMTP id fp13sf3616935lab.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 24 May 2013 13:17:14 -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=MKbIkdZDzvkmfVSjOyxciBEDKpQTM7r6rz1OXxFWSzs=;
        b=C9noC1Mrxc+9lUJWCWrI2XSHkIM3A1uqYo2iCXdPiKnz/l/AV7db/jjKPCHVAKoCht
         9xck9KExGXDVd3IUHZADJdjatUrw68UpCGnJ4CBoqRYK9GqgnAVHu/nyUlxYx0JSQf7p
         e9KVh89c3f2j2Id+wBVIlTxlvgJjDDLYLxqYIMaOMtBo5K0529Yq0mT5HtuChAe0IO22
         YmN3Kxx+YfybkfrSbdhwwO9oMA+U25d6jMvSmnSxRp7XnrhQHjS59mB1J0Jd/xqbhg4g
         IAUzk5k5wZUyuYQErm2PNcR7SQdbDRg56r37TEd/tGfLp+UBsCrHu3pQitUREhqKhcsF
         gzfg==
X-Received: by 10.112.154.41 with SMTP id vl9mr3395286lbb.19.1369426634047;
        Fri, 24 May 2013 13:17:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.19.99 with SMTP id d3ls440lae.70.gmail; Fri, 24 May 2013
 13:17:12 -0700 (PDT)
X-Received: by 10.152.37.164 with SMTP id z4mr9692599laj.21.1369426632805;
        Fri, 24 May 2013 13:17:12 -0700 (PDT)
Original-Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [2a00:1450:4010:c03::234])
        by mx.google.com with ESMTPS id f7si6095937lbe.61.2013.05.24.13.17.11
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 24 May 2013 13:17:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of fernando.cacciola@gmail.com designates 2a00:1450:4010:c03::234 as permitted sender) client-ip=2a00:1450:4010:c03::234;
Original-Received: by mail-la0-f52.google.com with SMTP id fo13so4909790lab.11
        for <std-proposals@isocpp.org>; Fri, 24 May 2013 13:17:11 -0700 (PDT)
X-Received: by 10.112.120.170 with SMTP id ld10mr9665669lbb.31.1369426631288;
 Fri, 24 May 2013 13:17:11 -0700 (PDT)
Original-Received: by 10.114.96.200 with HTTP; Fri, 24 May 2013 13:16:31 -0700 (PDT)
In-Reply-To: <CAFk2RUaTOwE-LcbOYXMRbd4hsNpdDSxUq8wFWKw-yff1_cK7ag@mail.gmail.com>
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 2a00:1450:4010:c03::234 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:4554
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4554>

--047d7bf0c5bee76d9504dd7c7b48
Content-Type: text/plain; charset=ISO-8859-1

On Fri, May 24, 2013 at 5:07 PM, Ville Voutilainen <
ville.voutilainen@gmail.com> wrote:

>
>
>
> On 24 May 2013 22:46, Fernando Cacciola <fernando.cacciola@gmail.com>wrote:
>
>> 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.
>>
>>> Returning future<pair<size_t, vector<future<R>>>> would provide
>>> efficiency and safety.
>>>
>>> What if you had more than one simultaneous result?
>>
>>
> Then the size_t gives you the one that was noticed first, and the rest are
> still in the vector?
>
> But you would not know if you got just one result, so you would
nonetheless scan the whole vector just the same.

future<pair<vector<size_t>,vector<future<R>>>> would fix that, but it's
getting complex.

-- 
Fernando Cacciola
SciSoft Consulting, Founder
http://www.scisoft-consulting.com

-- 

--- 
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 email 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-proposals/?hl=en.



--047d7bf0c5bee76d9504dd7c7b48
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 5:07 PM, Ville Voutilainen <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:ville.voutilainen@gmail.com" target=3D"_blank">ville.voutilaine=
n@gmail.com</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"><div dir=3D"ltr"><br><div class=3D"gmail_ext=
ra"><br><br><div class=3D"gmail_quote"><div class=3D"im">On 24 May 2013 22:=
46, Fernando Cacciola <span dir=3D"ltr">&lt;<a href=3D"mailto:fernando.cacc=
iola@gmail.com" target=3D"_blank">fernando.cacciola@gmail.com</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"><div dir=3D"ltr"><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><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><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Returning future&lt;pair&lt;size_t,
    vector&lt;future&lt;R&gt;&gt;&gt;&gt; would provide efficiency and
    safety.<span><font color=3D"#888888"><br>
    <br></font></span></div></blockquote></div><div>What if you had more th=
an one simultaneous result?<span><font color=3D"#888888"><br></font></span>=
</div></div><span><font color=3D"#888888"><br>
</font></span></div></div></blockquote><div><br></div></div><div>Then the s=
ize_t gives you the one that was noticed first, and the rest are still in t=
he vector? <br></div></div><br></div></div></blockquote><div>But you would =
not know if you got just one result, so you would nonetheless scan the whol=
e vector just the same.<br>

<br></div><div>future&lt;pair&lt;vector&lt;size_t&gt;,vector&lt;future&lt;R=
&gt;&gt;&gt;&gt; would fix that, but it&#39;s getting complex.<br clear=3D"=
all"></div></div><br>-- <br>Fernando Cacciola<br>SciSoft Consulting, Founde=
r<br>

<a href=3D"http://www.scisoft-consulting.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 />

--047d7bf0c5bee76d9504dd7c7b48--

.
