220 21925 <CA+wfc1-b_TaJT-FQmZ3hEYzH+B16CaqcBd4wbgmf84gagegHYw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Oliver Kowalke <oliver.kowalke@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: is await an extension of the do-notation? (was Re:
 Re: Resumable expressions p0114r0 vs async/await P0057R0)
Date: Wed, 21 Oct 2015 18:45:01 +0200
Lines: 90
Approved: news@gmane.org
Message-ID: <CA+wfc1-b_TaJT-FQmZ3hEYzH+B16CaqcBd4wbgmf84gagegHYw@mail.gmail.com>
References: <639f0012-8cb4-4db3-82a6-8d042a3497f9@isocpp.org>
 <401aa118-ed0b-4c7b-92cf-3fbd706eff9d@isocpp.org> <fcbcc1c4-535c-4fa2-a17d-4acffe84a4b5@isocpp.org>
 <1d15dbc4-e0c1-4df1-86db-014e11f14d26@isocpp.org> <56114953.4030701@wanadoo.fr>
 <561B403D.4030403@gmail.com> <CAOfiQqkKvZfVatJ1Bz4qSvGc-g6iep0xeP1B1=J1-gCu43NXxg@mail.gmail.com>
 <561C07D1.3080304@gmail.com> <CAOfiQqnR4GYCttwu8G-44_UEN4WekW19uorEvf-5VC3vOpej-g@mail.gmail.com>
 <561C213F.1060009@gmail.com> <fb82d876-8a54-4c28-8e53-297018470cf6@isocpp.org>
 <561C3875.2050701@gmail.com> <86924069-44d0-447f-bf8a-a42e46579832@isocpp.org>
 <561D79A7.8080007@gmail.com> <894616d6-9609-4038-b2bc-d2c62df21e0f@isocpp.org>
 <99bdb3ae-9214-4440-8572-4c47a61eda46@isocpp.org> <58628096-14ae-42b2-89d3-c0bd2183bbc0@isocpp.org>
 <561DC957.8080603@gmail.com> <a44dae17-5f63-4c60-a943-d74a1332b54c@isocpp.org>
 <d3723a3d-1b73-4c6c-bc7f-3d224d2ec8a2@isocpp.org> <2e09660f-d688-474a-8811-85fb041f68b8@isocpp.org>
 <f3dbc6ee-80cf-43f1-9b49-7ed1879de0cc@isocpp.org> <8b78abb4-16b6-4b65-8513-6e2c17317647@isocpp.org>
 <CAL52AasThHcBZUbyT1NfgzEe+qaWKuO9eE6pxS-qfXxxSSbcbQ@mail.gmail.com>
 <779be861-3b2a-427a-b36b-ad2874c81129@isocpp.org> <CAL52AasaxsP2i-Bh-kVrCoKad_Z08dUpL-0w=Lb2dyTGz3f9PQ@mail.gmail.com>
 <767364f8-785d-4f8f-9bc0-852df56ee4eb@isocpp.org> <f27fd4c9-86c4-44a7-8162-991a32a38e63@isocpp.org>
 <CA+wfc1-qmKY-yA1fPOmWjGuR7qTMY3PRVbjxtPaPn2FLad2hBA@mail.gmail.com>
 <d7653631-b45c-4952-a308-9919e84c538e@isocpp.org> <CA+wfc1-s0_TZUn_FcoPnEFTOiofM8oLwdy_4EWDmtK+wApratw@mail.gmail.com>
 <f03a6bdc-6719-4f4a-bcff-e39d819e2eff@isocpp.org> <CA+wfc1_16+NXesmOFUrOJpPa=X+RGm0Rr89CTe1mGFWK8JUAiA@mail.gmail.com>
 <0a728eee-e8e7-48ea-adf6-2a8dae63916e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c30b94aa5a610522a01ad6
X-Trace: ger.gmane.org 1445445925 18739 80.91.229.3 (21 Oct 2015 16:45:25 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 21 Oct 2015 16:45:25 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCLZHP5J7MHRBIMCT6YQKGQE457D3VY@isocpp.org Wed Oct 21 18:45:23 2015
Return-path: <std-proposals+bncBCLZHP5J7MHRBIMCT6YQKGQE457D3VY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f200.google.com ([209.85.220.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCLZHP5J7MHRBIMCT6YQKGQE457D3VY@isocpp.org>)
	id 1ZowVv-0003SU-A6
	for gclcip-std-proposals@m.gmane.org; Wed, 21 Oct 2015 18:45:23 +0200
Original-Received: by qkes204 with SMTP id s204sf59621396qke.0
        for <gclcip-std-proposals@m.gmane.org>; Wed, 21 Oct 2015 09:45:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3Pn6B6sI3XVPkaScbhc+BqfamUHynXM1sP5+m2h/ycU=;
        b=WX5CfmnGVmmyJi4KpWiN4D0uAjFIhCsVbyobA/q5+qQnjBuSNK5X/rjjyjFqq3VB1h
         fUqw2UTaalnkM0OjUx04luKNSuVtQmuLKEDGk1P2U3m2wghDGOKrrOW6JnQuakfTavGE
         fKotFxouakewn5Tqfx5ekMeoIM8CdxmwI4DFtqJu+3IGBuCGVzZF2wxJD8Vly8vUOkaS
         FgNRgdDQqSHRaeObU2MISxWL21Oi7gQXvjkVPnsmvvcJRQh5QcnP/aojpbHEKN2eQpvH
         semQlpqxhzQbJZKeXv6gtfcahbjyzFtbReK+V5Tx3YMstlSQn5CXprKVapmvg5VHLFvU
         efWQ==
X-Gm-Message-State: ALoCoQmVceW4vx9LGvrqR+iiygmeuqjgocKL3+jbFdCCXdsqY2aNNbLv8oC+IP4fQZjah7eEUCHB
X-Received: by 10.140.233.208 with SMTP id e199mr8509345qhc.8.1445445922217;
        Wed, 21 Oct 2015 09:45:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.182.73.198 with SMTP id n6ls483907obv.16.gmail; Wed, 21 Oct
 2015 09:45:21 -0700 (PDT)
X-Received: by 10.202.169.7 with SMTP id s7mr6766420oie.28.1445445921375;
        Wed, 21 Oct 2015 09:45:21 -0700 (PDT)
Original-Received: from mail-ob0-x22b.google.com (mail-ob0-x22b.google.com. [2607:f8b0:4003:c01::22b])
        by mx.google.com with ESMTPS id k9si5976383oif.109.2015.10.21.09.45.21
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 21 Oct 2015 09:45:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of oliver.kowalke@gmail.com designates 2607:f8b0:4003:c01::22b as permitted sender) client-ip=2607:f8b0:4003:c01::22b;
Original-Received: by obbwb3 with SMTP id wb3so46158881obb.0
        for <std-proposals@isocpp.org>; Wed, 21 Oct 2015 09:45:21 -0700 (PDT)
X-Received: by 10.182.119.230 with SMTP id kx6mr6798907obb.62.1445445921034;
 Wed, 21 Oct 2015 09:45:21 -0700 (PDT)
Original-Received: by 10.76.71.233 with HTTP; Wed, 21 Oct 2015 09:45:01 -0700 (PDT)
In-Reply-To: <0a728eee-e8e7-48ea-adf6-2a8dae63916e@isocpp.org>
X-Original-Sender: oliver.kowalke@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of oliver.kowalke@gmail.com designates 2607:f8b0:4003:c01::22b as
 permitted sender) smtp.mailfrom=oliver.kowalke@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:21925
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21925>

--001a11c30b94aa5a610522a01ad6
Content-Type: text/plain; charset=UTF-8

2015-10-21 15:43 GMT+02:00 Giovanni Piero Deretta <gpderetta@gmail.com>:

>
> Sorry for being dense, this I do not understand. I do not see how one
> follows from the other and it doesn't match my experience.
>

for a context switch you need the current context, which is required to be
preserved, and a target context, which has to be resumed
I thought it is convenient only to know the target context and simply call
execution-context::operator() to switch to the target-context.

it is a small API - one function to resume the context, one function to
access the current context


>  callcc is the task switching primitive: it suspend the current thread of
> execution and resumes the target one. On the just awakened thread of
> execution it returns the just suspened continuation.
>

it is not so much different than execution_context of course I could pass
the current context through the context switch
(execution_context::operator()) to the target context.
with your callcc the target context always knows its calling context
(parent context, what would be the right wording?).
but in some cases the target context does not need to know from which
context it was resumed.
maybe callcc and execution_context are equivalent

-- 

--- 
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/.

--001a11c30b94aa5a610522a01ad6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">2015=
-10-21 15:43 GMT+02:00 Giovanni Piero Deretta <span dir=3D"ltr">&lt;<a href=
=3D"mailto:gpderetta@gmail.com" target=3D"_blank">gpderetta@gmail.com</a>&g=
t;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><span class=3D""></span><br><d=
iv>Sorry for being dense, this I do not understand. I do not see how one fo=
llows from the other and it doesn&#39;t match my experience.<br></div></blo=
ckquote><div><br></div><div>for a context switch you need the current conte=
xt, which is required to be preserved, and a target context, which has to b=
e resumed<br></div><div>I thought it is convenient only to know the target =
context and simply call execution-context::operator() to switch to the targ=
et-context.<br><br></div><div>it is a small API - one function to resume th=
e context, one function to access the current context<br></div><div>=C2=A0<=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><div>=C2=A0callcc is the task switching=
 primitive: it suspend the current thread of execution and resumes the targ=
et one. On the just awakened thread of execution it returns the just suspen=
ed continuation.<br></div></blockquote><div>=C2=A0</div></div>it is not so =
much different than execution_context of course I could pass the current co=
ntext through the context switch (execution_context::operator()) to the tar=
get context.<br></div><div class=3D"gmail_extra">with your callcc the targe=
t context always knows its calling context (parent context, what would be t=
he right wording?).<br></div><div class=3D"gmail_extra">but in some cases t=
he target context does not need to know from which context it was resumed.<=
br></div><div class=3D"gmail_extra">maybe callcc and execution_context are =
equivalent<br></div></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<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 />

--001a11c30b94aa5a610522a01ad6--

.
