Topic: Questions to N3708 (A proposal to add coroutines


Author: Oliver Kowalke <oliver.kowalke@gmail.com>
Date: Fri, 6 Sep 2013 09:44:38 +0200
Raw View
--047d7b1121bff24ad104e5b235e2
Content-Type: text/plain; charset=ISO-8859-1

>
> The paper contains an example of implementing await/resumable functions in
> terms of coroutines. However, what I do not understand, is whether the
> concurrency aspect covered?
>

the intention was to show that coroutines could be used to implement
resumable functions, e.g. how to provide resume/suspend (suspention points
of resumable functions), without introducing new
C++ keywords.


> The resumable functions proposal uses futures, and, if I understand
> correctly, they will potentially run in multiple threads.
>

AFAIK, N3722 deals how to simplify programming with async. operations (for
instance asnyc. I/O; scattering code with callbacks as required by the
'old' boost.asio).
Consider the new 'async. result' feature from boost.asio - it allows a
synchronous formulation of your code without callbacks (using internaly
coroutines).
As I understand N3722, resumable functions have the same goal (but more
general applicable).
future<> is only used to return a 'deferred' result.


> The coroutines proposal does not cover this, as far as I can tell.
>
coroutiens might executed in a different thread


> Could coroutines be a fundamental building block, and part of the various
> concurrency proposals (task_group, resumable functions...)? It looks like
> it could have an elegant outcome...
>

I would consider coroutines as a building-block for enhanced control-flow -
and might be useable for other proposals.

--

---
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/.

--047d7b1121bff24ad104e5b235e2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">The paper co=
ntains an example of implementing await/resumable functions in terms of cor=
outines. However, what I do not understand, is whether the concurrency aspe=
ct covered?</div>
</blockquote><div><br>the intention was to show that coroutines could be us=
ed to implement resumable functions, e.g. how to provide resume/suspend (su=
spention points of resumable functions), without introducing new<br></div>
<div>C++ keywords.<br></div><div>=A0</div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex"><div dir=3D"ltr">The resumable functions proposal uses fut=
ures, and, if I understand correctly, they will potentially run in multiple=
 threads.</div>
</blockquote><div><br></div><div>AFAIK, N3722 deals how to simplify program=
ming with async. operations (for instance asnyc. I/O; scattering code with =
callbacks as required by the &#39;old&#39; boost.asio).<br></div><div>Consi=
der the new &#39;async. result&#39; feature from boost.asio - it allows a s=
ynchronous formulation of your code without callbacks (using internaly coro=
utines).<br>
</div><div>As I understand N3722, resumable functions have the same goal (b=
ut more general applicable).<br></div><div>future&lt;&gt; is only used to r=
eturn a &#39;deferred&#39; result.<br></div><div>=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
<div dir=3D"ltr">The coroutines proposal does not cover this, as far as I c=
an tell.<br></div></blockquote><div>coroutiens might executed in a differen=
t thread<br></div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex">
<div dir=3D"ltr">Could coroutines be a fundamental building block, and part=
 of the various concurrency proposals (task_group, resumable functions...)?=
 It looks like it could have an elegant outcome...<span class=3D""></span><=
br>
</div></blockquote></div><br></div><div class=3D"gmail_extra">I would consi=
der coroutines as a building-block for enhanced control-flow - and might be=
 useable for other proposals.<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 />

--047d7b1121bff24ad104e5b235e2--

.