220 9017 <535ebb45-8fe4-408f-b042-462b212854e7@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: lcidfire@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Async variant of N3784
Date: Mon, 3 Feb 2014 05:12:45 -0800 (PST)
Lines: 71
Approved: news@gmane.org
Message-ID: <535ebb45-8fe4-408f-b042-462b212854e7@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_2438_4765619.1391433165610"
X-Trace: ger.gmane.org 1391433166 18523 80.91.229.3 (3 Feb 2014 13:12:46 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 3 Feb 2014 13:12:46 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDQNNZXYSYDRBT5LX2LQKGQEPD7LMSI@isocpp.org Mon Feb 03 14:12:52 2014
Return-path: <std-proposals+bncBDQNNZXYSYDRBT5LX2LQKGQEPD7LMSI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f71.google.com ([209.85.219.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDQNNZXYSYDRBT5LX2LQKGQEPD7LMSI@isocpp.org>)
	id 1WAJKT-0001KS-Jr
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Feb 2014 14:12:49 +0100
Original-Received: by mail-oa0-f71.google.com with SMTP id g12sf30760016oah.10
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Feb 2014 05:12:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=01ttjOd4/q+ird+nPQbrWcEPmoJeKktw9Vxy9UuZ1GY=;
        b=tkVxKLWK7gU7l5/N8NgB0LwLjyvU+Tl3W74LELKMKAqVMi3KmSlFl/+Fu4uyvd3R0W
         VLw/G3L4B5aOG/wJvxNq3bdnnykK11eTQGcImKyNY5FS4SWIhu8ywRXLHGcTXZJ54W/M
         XyWhX9TWHqxssLmL0ErhDcZYXQTP1kln7BVup1bx1XscjhClHFhcEgelpIZpCsaIUUXF
         P0zy7ofRvPRoriVGefHWvW/UYOFy3sXqpIw2+9WtLVbe9eSmIzUhwJR9q+Ft4evLWsLP
         OZCrEfk73G8IrT9RBSZKb477yQqgDBHfZoW6oy1YNP0TkPy630+yCWr8UVNPLp7lu4M5
         bNEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=01ttjOd4/q+ird+nPQbrWcEPmoJeKktw9Vxy9UuZ1GY=;
        b=T+FLss5Ll/hzp9GG69iennCYL8V35GNrHlWqS0xq5MIQLGGwwlpy2gY4+T7+B8jqzF
         nidmxjTnC+OeJTKpJKjUYmjUKjw+K4ySgUZSNRMZAnuCt7GJJGC01MFQpvhTFmnMQKul
         W73htLRVAKgt6Me9wpySnaS9sx9T6zsK6g/8X2tf1LGUlvH1HnVz7sqQ9FxKeT4haKZW
         4C0n6JDbg6Qt8IRkeZNZovjf+9eFDtl/a98IlZlSGBAGkch497Kokz+rcekj7dDPkC7S
         Tq5j+oRugue27qNVxReoSa7jOgOKo7bYGNbI/peNJmRpPfjzeeOmlNjGWRg5g/h8pzd3
         3DzQ==
X-Gm-Message-State: ALoCoQl0m23Vr2EvWUBBCIgazHZ+Dl11DriAd9vHhnn5uh+p4jmpkdGyWmWzDxyXFBRk2InTzwwr
X-Received: by 10.50.33.47 with SMTP id o15mr5850539igi.0.1391433168569;
        Mon, 03 Feb 2014 05:12:48 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.117.66 with SMTP id kc2ls2024246igb.10.gmail; Mon, 03 Feb
 2014 05:12:47 -0800 (PST)
X-Received: by 10.50.85.81 with SMTP id f17mr101429igz.12.1391433167197;
        Mon, 03 Feb 2014 05:12:47 -0800 (PST)
X-Original-Sender: lcidfire@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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:9017
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9017>

------=_Part_2438_4765619.1391433165610
Content-Type: text/plain; charset=UTF-8

While implementing parts of N3784 with libc++, I encountered the situation, 
that I wanted to return a "future" from a function, that can NOT be 
accessed synchronously.

I now thought about adding the following two functions:

template< class Type >
continuator async_cast(std::future<Type> fut) noexcept;
	template< class Type >
shared_continuator async_cast(std::shared_future<Type> fut) noexcept;

The difference for the continuator is, that it does not have a blocking get and only works asynchronously.
The question is whether this is a common scenario. And if such a continuator is added, whether it would make sense to composite the future classes out of a continuator.

-- 

--- 
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/.

------=_Part_2438_4765619.1391433165610
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">While implementing parts of N3784 with libc++, I encounter=
ed the situation, that I wanted to return a "future" from a function, that =
can NOT be accessed synchronously.<div><br></div><div>I now thought about a=
dding the following two functions:</div><div><br></div><div><pre class=3D"l=
ine-pre" style=3D"font-size: 12px; line-height: 16.799999237060547px; width=
: 744px; color: rgb(0, 0, 0);"><div class=3D"line" id=3D"file-future-LC9" s=
tyle=3D"font-family: Consolas, 'Liberation Mono', Courier, monospace;">temp=
late&lt; class Type &gt;</div><div class=3D"line" id=3D"file-future-LC10" s=
tyle=3D"font-family: Consolas, 'Liberation Mono', Courier, monospace;">cont=
inuator async_cast(std::future&lt;Type&gt; fut) noexcept;</div><div class=
=3D"line" id=3D"file-future-LC11" style=3D"font-family: Consolas, 'Liberati=
on Mono', Courier, monospace;">	</div><div class=3D"line" id=3D"file-future=
-LC12" style=3D"font-family: Consolas, 'Liberation Mono', Courier, monospac=
e;">template&lt; class Type &gt;</div><div class=3D"line" id=3D"file-future=
-LC13" style=3D"font-family: Consolas, 'Liberation Mono', Courier, monospac=
e;">shared_continuator async_cast(std::shared_future&lt;Type&gt; fut) noexc=
ept;</div><div class=3D"line" id=3D"file-future-LC13"><font face=3D"arial, =
sans-serif"><br></font></div><div class=3D"line" id=3D"file-future-LC13"><f=
ont face=3D"arial, sans-serif">The difference for the continuator is, that =
it does not have a blocking </font><font face=3D"verdana, sans-serif">get a=
nd only works asynchronously</font><font face=3D"arial, sans-serif">.</font=
></div><div class=3D"line" id=3D"file-future-LC13"><font face=3D"arial, san=
s-serif">The question is whether this is a common scenario. And if such a c=
ontinuator is added, whether it would make sense to composite the future cl=
asses out of a continuator.</font></div></pre></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_2438_4765619.1391433165610--

.
