220 9100 <2bcb57a2-f98d-4468-b908-7775caef15e0@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Agust=C3=ADn_K-ballo_Berg=C3=A9?= <kaballo@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Async variant of N3784
Date: Wed, 5 Feb 2014 08:08:46 -0800 (PST)
Lines: 102
Approved: news@gmane.org
Message-ID: <2bcb57a2-f98d-4468-b908-7775caef15e0@isocpp.org>
References: <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_539_22421895.1391616526638"
X-Trace: ger.gmane.org 1391616523 2304 80.91.229.3 (5 Feb 2014 16:08:43 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 5 Feb 2014 16:08:43 +0000 (UTC)
Cc: lcidfire@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCJ4ZKOW3QCRBD6EZGLQKGQELM65ZXQ@isocpp.org Wed Feb 05 17:08:51 2014
Return-path: <std-proposals+bncBCJ4ZKOW3QCRBD6EZGLQKGQELM65ZXQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ob0-f197.google.com ([209.85.214.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCJ4ZKOW3QCRBD6EZGLQKGQELM65ZXQ@isocpp.org>)
	id 1WB51t-0007T5-0z
	for gclcip-std-proposals@m.gmane.org; Wed, 05 Feb 2014 17:08:49 +0100
Original-Received: by mail-ob0-f197.google.com with SMTP id gq1sf2826398obb.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 05 Feb 2014 08:08:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:cc:message-id:in-reply-to:references: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=Y8b4CwXpLe7UrqypuWXKpk2Q2c7Y76Y4OBXakG8tR+o=;
        b=OxqouocDJpPwVkpyxDFxFVf3uKMI001iw4MMhhBCaJy+ln0BWghrkAgY+XcKSr69KL
         f2ew5JP6HRprgGBTqPqpAZ/UXHtDZQvOy/L6x+NIZP9LG6ZuCrKvOA9Kqhr6c1ZmQKhQ
         d6RgPRCdkvfYnMqgwv6zayWHCJ0BMixaCG112BxBTajgGZNYcbm2GwuPuTG9jV1Jz/o4
         AQmLzSjKNEcKpUSj+cFEDPUDNYiSi00K+gMyouNcjdXYsNyljjKIDh5qGWfzBAvhteH6
         8EC6SWuaKpmQWDntiEeNeVGzV0+i8sE422WBBjq1f5spDrbTBqo51PoMyF0j/EW4Ak2X
         XIlQ==
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:cc:message-id:in-reply-to
         :references: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=Y8b4CwXpLe7UrqypuWXKpk2Q2c7Y76Y4OBXakG8tR+o=;
        b=eO2sGdTaivaYQ2uHWSfOC9JMh7uNMOTbjTGcO1j31ieDKINSHd8DukaeOP6TABV/CC
         Pp68sPE7kMxJSrWTTBq3g3zIB0bNRLBt96596gJJKB4SLv1Ry7Ga5uz+DSvjbyUWl2Up
         utwQpJrcyYtkX8Qy5wNcn39TB4436QEV83jYhkxVVzZo+dD80bJJq3z8YIUF8SkYDKTJ
         ihrGmbo2d8Aj4o/Xhr8SRpM+hY2yugwqynGdW74hvY2Lm1JgrC5OaPSekEfTdR9jrdC7
         c/z+Gyy6i+naPPZSGyJy8OkkNyLp029u5JOFdpgEcJSMrDmLddqtToT9bL3Qr1kor6rk
         gIow==
X-Gm-Message-State: ALoCoQl8TIR2DC1bkehQOJREbMGTrLo9vuh0b5oAZUK+nmyxcWoE5hEielMZt/YqAWZa6XHTXFOE
X-Received: by 10.182.111.227 with SMTP id il3mr848017obb.41.1391616528031;
        Wed, 05 Feb 2014 08:08:48 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.46.134 with SMTP id v6ls60916obm.50.gmail; Wed, 05 Feb
 2014 08:08:47 -0800 (PST)
X-Received: by 10.182.84.199 with SMTP id b7mr18009obz.13.1391616527420;
        Wed, 05 Feb 2014 08:08:47 -0800 (PST)
In-Reply-To: <535ebb45-8fe4-408f-b042-462b212854e7@isocpp.org>
X-Original-Sender: kaballo@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:9100
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9100>

------=_Part_539_22421895.1391616526638
Content-Type: text/plain; charset=UTF-8

On Monday, February 3, 2014 7:12:45 AM UTC-6, lcid...@gmail.com wrote:
>
> 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.
>
>
Could you elaborate on those situations? What does it mean that a "future" 
cannot be accessed synchronously? What would happen if I did access that 
"future" 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.
>
>
Would you care to provide more detail about this "continuator"? I assume it 
doesn't have `wait` either, but that's just me guessing...
 

> 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 hardly explained which scenario is that. Why don't you start by 
explaining your scenario, the problems a regular future would present, and 
how your "continuation" fix them first? 

-- 

--- 
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_539_22421895.1391616526638
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Monday, February 3, 2014 7:12:45 AM UTC-6, lcid...@gmai=
l.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">W=
hile implementing parts of N3784 with libc++, I encountered the situation, =
that I wanted to return a "future" from a function, that can NOT be accesse=
d synchronously.<div><br></div></div></blockquote><div><br>Could you elabor=
ate on those situations? What does it mean that a "future" cannot be access=
ed synchronously? What would happen if I did access that "future" synchrono=
usly?<br>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div></div><div>I now thought about adding the following two funct=
ions:</div><div><br></div><div><pre style=3D"font-size:12px;line-height:16.=
799999237060547px;width:744px;color:rgb(0,0,0)"><div style=3D"font-family:C=
onsolas,'Liberation Mono',Courier,monospace">template&lt; class Type &gt;</=
div><div style=3D"font-family:Consolas,'Liberation Mono',Courier,monospace"=
>continuator async_cast(std::future&lt;Type&gt; fut) noexcept;</div><div st=
yle=3D"font-family:Consolas,'Liberation Mono',Courier,monospace">	</div><di=
v style=3D"font-family:Consolas,'Liberation Mono',Courier,monospace">templa=
te&lt; class Type &gt;</div><div style=3D"font-family:Consolas,'Liberation =
Mono',Courier,monospace">shared_continuator async_cast(std::shared_future&l=
t;<wbr>Type&gt; fut) noexcept;</div><div><font face=3D"arial, sans-serif"><=
br></font></div><div><font face=3D"arial, sans-serif">The difference for th=
e continuator is, that it does not have a blocking </font><font face=3D"ver=
dana, sans-serif">get and only works asynchronously</font><font face=3D"ari=
al, sans-serif">.</font></div></pre></div></div></blockquote><div><br>Would=
 you care to provide more detail about this "continuator"? I assume it does=
n't have `wait` either, but that's just me guessing...<br>&nbsp;</div><bloc=
kquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-l=
eft: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div><pre style=3D=
"font-size:12px;line-height:16.799999237060547px;width:744px;color:rgb(0,0,=
0)"><div><font face=3D"arial, sans-serif">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.</font></div></=
pre></div></div></blockquote><div><br>You hardly explained which scenario i=
s that. Why don't you start by explaining your scenario, the problems a reg=
ular future would present, and how your "continuation" fix them first? <br>=
</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_539_22421895.1391616526638--

.
