220 21571 <a1c097ac-b96b-48ef-b37a-c289400b300b@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Gor Nishanov <gornishanov@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: P0099 suggestion: Minimal support for asymmetric suspend/resume
Date: Sun, 11 Oct 2015 22:18:34 -0700 (PDT)
Lines: 82
Approved: news@gmane.org
Message-ID: <a1c097ac-b96b-48ef-b37a-c289400b300b@isocpp.org>
References: <f3965f07-5e1a-49c7-87e4-5ba7f93d09e5@isocpp.org>
 <dafc4ddf-8897-445b-afef-b366e0fb6bf2@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_282_1221219854.1444627114449"
X-Trace: ger.gmane.org 1444627120 31140 80.91.229.3 (12 Oct 2015 05:18:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 12 Oct 2015 05:18:40 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC47RF4IW4GRBK4F5WYAKGQEK4THL3I@isocpp.org Mon Oct 12 07:18:39 2015
Return-path: <std-proposals+bncBC47RF4IW4GRBK4F5WYAKGQEK4THL3I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f69.google.com ([209.85.218.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC47RF4IW4GRBK4F5WYAKGQEK4THL3I@isocpp.org>)
	id 1ZlVVN-0008Nu-9j
	for gclcip-std-proposals@m.gmane.org; Mon, 12 Oct 2015 07:18:37 +0200
Original-Received: by oiak8 with SMTP id k8sf123242351oia.0
        for <gclcip-std-proposals@m.gmane.org>; Sun, 11 Oct 2015 22:18:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=DwWhqY6qE7SyUSgypTQstnMsKPuzRc5bxKtJ80Eba/E=;
        b=GaPYOgHdbg4hD3FMJzvtOrnEZMD49bcUqtBMvLAgA3Lk7W8YZpuI7qCA+moW8bZMnd
         g6r3OrB53pzf4tGUp3YBFPrqtryepW1+idLDC29B0i+cqY8LpTGla8bqSbeRgGhNieno
         wgyvJRkRI26xB+l4lc6XK7ZErD/nCzQI2zTnDcpcy2VW3P/2g6eR/ibc43O7SKkLHGSg
         ppoPyexR19HnDBMwRaX1eaHXO1w1UY9ttR1x3X+Q8Z1PFaY0ShvUk1UeiN+6UTyTQEjb
         VjZzFDUK2NegDRe9ARhMGRLHtx48nFDcLqHICTATURGJXn6R0k9AbWzGFv1w2UPTlHo3
         UdWw==
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:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=DwWhqY6qE7SyUSgypTQstnMsKPuzRc5bxKtJ80Eba/E=;
        b=huxy8dedlQs1ljm/1XkTfFPzOmtX7AqR1lyQRH1C9KgU13/FkGeAnKYqZsKYzyPDub
         s/599hDW2gKI/wNyCN37026b2nyK/qlI8R93e6H7ZRyJqd5M4L0lmo5jvh4Sm2pl6F+E
         eqx3vxWJkfgl8hz3IdW6wqk+umJn7Ce0Hr/xuvPOp9KgAlTAQaoMQh+ImrGUr1zGKFS4
         azM5TqUrytcsmIuVL/fSYTb5rREt6GEQTurzqcD6NOurQVCQ1YvLvZABWCRZyTCAEDPv
         vXN3mxJEh2o7kMzWei0Tu+hv0LOppkfup3Cu4elIy45bwHvvvle0Xv9+h5TosWVBBseX
         HN8Q==
X-Gm-Message-State: ALoCoQk485epTTLdSciImwUsrFfYh3HCFyl0iuGeXrUKm91sQb4N4qqmSDZjgVqlYVVgjKWRSCCw
X-Received: by 10.107.40.133 with SMTP id o127mr22348324ioo.27.1444627116063;
        Sun, 11 Oct 2015 22:18:36 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.31.67 with SMTP id f64ls1364703iof.72.gmail; Sun, 11 Oct
 2015 22:18:35 -0700 (PDT)
X-Received: by 10.50.43.195 with SMTP id y3mr106586igl.1.1444627115202;
        Sun, 11 Oct 2015 22:18:35 -0700 (PDT)
In-Reply-To: <dafc4ddf-8897-445b-afef-b366e0fb6bf2@isocpp.org>
X-Original-Sender: GorNishanov@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:21571
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/21571>

------=_Part_282_1221219854.1444627114449
Content-Type: multipart/alternative; 
	boundary="----=_Part_283_1364048933.1444627114449"

------=_Part_283_1364048933.1444627114449
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hmm... I think you can take execution_context as proposed in p0099 and=20
build a higher level abstraction on top without losing any efficiency.=20
Something like this:

fiber ctors + swap + assignment + destructor +

fiber.join() =E2=80=93 resumes the fiber (remembers the context who called =
it)

this_fiber::suspend() =E2=80=93 yields back to whomever called it

this_fiber::switch_to(another fiber) =E2=80=93 direct switch to another fib=
er. the=20
caller context is transferred to the new fiber.


I think at the moment. execution_context is as minimal and as efficient as=
=20
it can be.

--=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/.

------=_Part_283_1364048933.1444627114449
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hmm... I think you can take execution_context as proposed =
in p0099 and build a higher level abstraction on top without losing any eff=
iciency.=C2=A0<div>Something like this:</div><div><br></div><div><p class=
=3D"MsoNormal">fiber ctors + swap + assignment + destructor +<o:p></o:p></p=
>

<p class=3D"MsoNormal">fiber.join() =E2=80=93 resumes the fiber (remembers =
the context who
called it)<o:p></o:p></p>

<p class=3D"MsoNormal">this_fiber::suspend() =E2=80=93 yields back to whome=
ver called it<o:p></o:p></p>

<p class=3D"MsoNormal">this_fiber::switch_to(another fiber) =E2=80=93 direc=
t switch to
another fiber. the caller context is transferred to the new fiber.<o:p></o:=
p></p><p class=3D"MsoNormal"><br></p><p class=3D"MsoNormal">I think at the =
moment. execution_context is as minimal and as efficient as it can be.</p><=
/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 />

------=_Part_283_1364048933.1444627114449--
------=_Part_282_1221219854.1444627114449--

.
