220 4743 <51A6EFE6.4030407@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N3558 :A standardized representation of
 Asynchronous operation
Date: Thu, 30 May 2013 08:21:26 +0200
Lines: 115
Approved: news@gmane.org
Message-ID: <51A6EFE6.4030407@wanadoo.fr>
References: <519F9E48.7050700@wanadoo.fr> <51A0B7C3.40109@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------070705060804030208090906"
X-Trace: ger.gmane.org 1369894889 5397 80.91.229.3 (30 May 2013 06:21:29 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 30 May 2013 06:21:29 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBZ67TOGQKGQEZIODAJY@isocpp.org Thu May 30 08:21:29 2013
Return-path: <std-proposals+bncBDH67CONY4PBBZ67TOGQKGQEZIODAJY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-fa0-f72.google.com ([209.85.161.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBZ67TOGQKGQEZIODAJY@isocpp.org>)
	id 1UhwEq-0007AX-On
	for gclcip-std-proposals@m.gmane.org; Thu, 30 May 2013 08:21:28 +0200
Original-Received: by mail-fa0-f72.google.com with SMTP id v1sf7911900fav.11
        for <gclcip-std-proposals@m.gmane.org>; Wed, 29 May 2013 23:21:28 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:message-id:date:from:user-agent:mime-version:to:subject
         :references:in-reply-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=bgQNnTIVNJM4fUmWFrgOLsoTBcWJjYWCuUrCxCRxo6w=;
        b=ghW73U4aty80jEUuF5UmJHrqRferjUjPI1tBgLINmEe6xasELrMmpq0BkfdsgPxD0N
         bekLJylPfuIM29g9B5ZZnjda5v5YdYBnco2BFukSQViYn4w0zNCRZsNHtFfB4AOHNChA
         /BOnMsEhqte4ZFN9Fn2MfSbBbPcH9MbdURuSunp5/3RVNsQY6bNHqI9HGKAjEzdZDzBQ
         jI8GR0DQ0rTefWEBRQvo9oBC0/G4Z8a5I6BjXBUdEbPRkbT8K2Xb+CTN+IkPXhv3elnS
         ka6NFgKV7N99dK7RPDNrUkV13dPjWFro/89EnD9LTAyKCLkt8Ps/70Modpcp5jrfV4+k
         TUxA==
X-Received: by 10.180.189.74 with SMTP id gg10mr2016963wic.4.1369894888220;
        Wed, 29 May 2013 23:21:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.103.67 with SMTP id fu3ls1743550wib.11.canary; Wed, 29 May
 2013 23:21:27 -0700 (PDT)
X-Received: by 10.180.198.80 with SMTP id ja16mr16715377wic.53.1369894887437;
        Wed, 29 May 2013 23:21:27 -0700 (PDT)
Original-Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr. [80.12.242.128])
        by mx.google.com with ESMTP id bf10si4496072wjc.64.2013.05.29.23.21.27
        for <std-proposals@isocpp.org>;
        Wed, 29 May 2013 23:21:27 -0700 (PDT)
Received-SPF: neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.128;
Original-Received: from pc4.home ([2.11.193.225])
	by mwinf5d41 with ME
	id i6MT1l0014sEqES036MTbk; Thu, 30 May 2013 08:21:27 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
In-Reply-To: <51A0B7C3.40109@wanadoo.fr>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.128 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mail=vicente.botet@wanadoo.fr
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:4743
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4743>

This is a multi-part message in MIME format.
--------------070705060804030208090906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 25/05/13 15:08, Vicente J. Botet Escriba a =E9crit :
> Le 24/05/13 19:07, Vicente J. Botet Escriba a =E9crit :
>> Hi,
>>
>> What is the rationale for when_all to return=20
>> future<vector<future<R>>> instead of future<vector<R>>?
>> What is the rationale for when_any to return=20
>> future<vector<future<R>>> instead of future<pair<size_t, R>> ?
>>
>>
> I have one more question about when_any. What would be the expected=20
> behavior when when_any has parameters that shared the same shared=20
> state, as in
>
>    std::shared_future<int> fi1 =3D=20
> std::async(calculate_the_answer_to_life_the_universe_and_everything).shar=
e();
>    std::shared_future<int> fi2 =3D fi1;
>    std::when_any(fi1, fi2).wait();
>
Or even this radical one

    std::future<int> fi1 =3D=20
std::async(calculate_the_answer_to_life_the_universe_and_everything).share(=
);
    std::when_any(fi1, fi1).wait();

Best,
Vicente

--=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.



--------------070705060804030208090906
Content-Type: text/html; charset=ISO-8859-1

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 25/05/13 15:08, Vicente J. Botet
      Escriba a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote cite="mid:51A0B7C3.40109@wanadoo.fr" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Le 24/05/13 19:07, Vicente J. Botet
        Escriba a &eacute;crit&nbsp;:<br>
      </div>
      <blockquote cite="mid:519F9E48.7050700@wanadoo.fr" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        Hi, <br>
        <br>
        What is the rationale for when_all to return
        future&lt;vector&lt;future&lt;R&gt;&gt;&gt; instead of&nbsp;
        future&lt;vector&lt;R&gt;&gt;? <br>
        What is the rationale for 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>
        <br>
        <br>
      </blockquote>
      I have one more question about when_any. What would be the
      expected behavior when when_any has parameters that shared the
      same shared state, as in<br>
      <br>
      &nbsp;&nbsp; std::shared_future&lt;int&gt; fi1 =
std::async(calculate_the_answer_to_life_the_universe_and_everything).share();<br>
      &nbsp;&nbsp; std::shared_future&lt;int&gt; fi2 = fi1;<br>
      &nbsp;&nbsp; std::when_any(fi1, fi2).wait();<br>
      <br>
    </blockquote>
    Or even this radical one<br>
    <br>
    &nbsp;&nbsp; std::future&lt;int&gt; fi1 =
std::async(calculate_the_answer_to_life_the_universe_and_everything).share();<br>
    &nbsp;&nbsp; std::when_any(fi1, fi1).wait();<br>
    <br>
    Best,<br>
    Vicente<br>
  </body>
</html>

<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 email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
&nbsp;<br />
&nbsp;<br />

--------------070705060804030208090906--

.
