Topic: N3857: exception propagation of future<>::then()


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Mon, 19 May 2014 07:26:42 +0200
Raw View
Hi,

I was wondering if the proposed future::then() function propagates the
exceptions thrown by the continuation to the resulting future. It is not
clear if it does it on the description of the function.

Vicente

--

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

.


Author: Artur Laksberg <Artur.Laksberg@microsoft.com>
Date: Tue, 20 May 2014 01:23:25 +0000
Raw View
Hi Vicente,

Yes, if a closure passed into future::then throws an exception, that exception is propagated into the returned future.

Artur

-----Original Message-----
From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]
Sent: Sunday, May 18, 2014 10:27 PM
To: std-proposals@isocpp.org; Artur Laksberg
Subject: N3857: exception propagation of future<>::then()

Hi,

I was wondering if the proposed future::then() function propagates the exceptions thrown by the continuation to the resulting future. It is not clear if it does it on the description of the function.

Vicente

--

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

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Tue, 20 May 2014 18:44:00 +0200
Raw View
Le 20/05/14 03:23, Artur Laksberg a =E9crit :
> Hi Vicente,
>
> Yes, if a closure passed into future::then throws an exception, that exce=
ption is propagated into the returned future.
>
Where in the proposal can I found the description?

Vicente
>
> -----Original Message-----
> From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]
> Sent: Sunday, May 18, 2014 10:27 PM
> To: std-proposals@isocpp.org; Artur Laksberg
> Subject: N3857: exception propagation of future<>::then()
>
> Hi,
>
> I was wondering if the proposed future::then() function propagates the ex=
ceptions thrown by the continuation to the resulting future. It is not clea=
r if it does it on the description of the function.
>
> Vicente
>

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

.


Author: Artur Laksberg <Artur.Laksberg@microsoft.com>
Date: Tue, 20 May 2014 17:00:41 +0000
Raw View
This is described in N3857 on page 6: "The lambda function takes a=20
future as its input which carries the exception through."

I admit this is imprecise. I'll make sure it's clearly stated in the draft =
concurrency TS that I'm submitting this week.

Artur

-----Original Message-----
From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]=20
Sent: Tuesday, May 20, 2014 9:44 AM
To: Artur Laksberg; std-proposals@isocpp.org
Subject: Re: N3857: exception propagation of future<>::then()

Le 20/05/14 03:23, Artur Laksberg a =E9crit :
> Hi Vicente,
>
> Yes, if a closure passed into future::then throws an exception, that exce=
ption is propagated into the returned future.
>
Where in the proposal can I found the description?

Vicente
>
> -----Original Message-----
> From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]
> Sent: Sunday, May 18, 2014 10:27 PM
> To: std-proposals@isocpp.org; Artur Laksberg
> Subject: N3857: exception propagation of future<>::then()
>
> Hi,
>
> I was wondering if the proposed future::then() function propagates the ex=
ceptions thrown by the continuation to the resulting future. It is not clea=
r if it does it on the description of the function.
>
> Vicente
>

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

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 21 May 2014 08:47:43 +0200
Raw View
This is a multi-part message in MIME format.
--------------070504060302080306080203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 20/05/14 19:00, Artur Laksberg a =E9crit :
> This is described in N3857 on page 6: "The lambda function takes a
> future as its input which carries the exception through."
>
> I admit this is imprecise. I'll make sure it's clearly stated in the draf=
t concurrency TS that I'm submitting this week.
>

Isn't this in contradiction with the following Requires clause?

2.4 Class |executor|

|void executor::add(std::function  closure);|


11 Requires:
    The invoked closure should not throw an exception.

I don't know if these functions that take a closure=20
(then()/add()/async()) can be overloaded for closures that can throw and=20
noexcept closures. Can them?

Vicente
> Artur
>
> -----Original Message-----
> From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]
> Sent: Tuesday, May 20, 2014 9:44 AM
> To: Artur Laksberg; std-proposals@isocpp.org
> Subject: Re: N3857: exception propagation of future<>::then()
>
> Le 20/05/14 03:23, Artur Laksberg a =E9crit :
>> Hi Vicente,
>>
>> Yes, if a closure passed into future::then throws an exception, that exc=
eption is propagated into the returned future.
>>
> Where in the proposal can I found the description?
>
> Vicente
>> -----Original Message-----
>> From: Vicente J. Botet Escriba [mailto:vicente.botet@wanadoo.fr]
>> Sent: Sunday, May 18, 2014 10:27 PM
>> To: std-proposals@isocpp.org; Artur Laksberg
>> Subject: N3857: exception propagation of future<>::then()
>>
>> Hi,
>>
>> I was wondering if the proposed future::then() function propagates the e=
xceptions thrown by the continuation to the resulting future. It is not cle=
ar if it does it on the description of the function.
>>
>> Vicente
>>

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

--------------070504060302080306080203
Content-Type: text/html; charset=ISO-8859-1

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 20/05/14 19:00, Artur Laksberg a
      &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
cite="mid:b5d0eff90e354ed380319859a96764e0@BY2PR03MB176.namprd03.prod.outlook.com"
      type="cite">
      <pre wrap="">This is described in N3857 on page 6: "The lambda function takes a
future as its input which carries the exception through."

I admit this is imprecise. I'll make sure it's clearly stated in the draft concurrency TS that I'm submitting this week.

</pre>
    </blockquote>
    <br>
    Isn't this in contradiction with the following Requires clause?<br>
    <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <span class="section-number">2.4</span> Class <code>executor</code><span
      class="section-number"></span><br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <pre><code><cxx-signature>void executor::add(std::function<void> closure);</void></cxx-signature></code></pre>
    <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <cxx-requires para_num="14" id="executors.base.executor.14"> <dt>11
        Requires:</dt>
      <dd> The invoked closure should not throw an exception.</dd>
    </cxx-requires><br>
    <br>
    I don't know if these functions that take a closure
    (then()/add()/async()) can be overloaded for closures that can throw
    and noexcept closures. Can them?<br>
    <br>
    Vicente<br>
    <blockquote
cite="mid:b5d0eff90e354ed380319859a96764e0@BY2PR03MB176.namprd03.prod.outlook.com"
      type="cite">
      <pre wrap="">Artur

-----Original Message-----
From: Vicente J. Botet Escriba [<a class="moz-txt-link-freetext" href="mailto:vicente.botet@wanadoo.fr">mailto:vicente.botet@wanadoo.fr</a>]
Sent: Tuesday, May 20, 2014 9:44 AM
To: Artur Laksberg; <a class="moz-txt-link-abbreviated" href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>
Subject: Re: N3857: exception propagation of future&lt;&gt;::then()

Le 20/05/14 03:23, Artur Laksberg a &eacute;crit :
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi Vicente,

Yes, if a closure passed into future::then throws an exception, that exception is propagated into the returned future.

</pre>
      </blockquote>
      <pre wrap="">Where in the proposal can I found the description?

Vicente
</pre>
      <blockquote type="cite">
        <pre wrap="">
-----Original Message-----
From: Vicente J. Botet Escriba [<a class="moz-txt-link-freetext" href="mailto:vicente.botet@wanadoo.fr">mailto:vicente.botet@wanadoo.fr</a>]
Sent: Sunday, May 18, 2014 10:27 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>; Artur Laksberg
Subject: N3857: exception propagation of future&lt;&gt;::then()

Hi,

I was wondering if the proposed future::then() function propagates the exceptions thrown by the continuation to the resulting future. It is not clear if it does it on the description of the function.

Vicente

</pre>
      </blockquote>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>

<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 email to <a href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

--------------070504060302080306080203--

.


Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Wed, 21 May 2014 08:58:34 +0200
Raw View
2014-05-21 8:47 GMT+02:00 Vicente J. Botet Escriba <vicente.botet@wanadoo.fr>:
> Isn't this in contradiction with the following Requires clause?
>
> 2.4 Class executor
>
> void executor::add(std::function closure);
>
> 11 Requires: The invoked closure should not throw an exception.

This looks like a broken requirement to me. "should" has the meaning
of a non-binding requirement in ISO standards, but a "Requires"
element has a binding meaning. Either this is intended to mean a
non-binding encouragement, in this case it should not be part of
Requires, or it it should say "shall" instead.

- Daniel

--

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

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 21 May 2014 13:13:42 +0200
Raw View
This is a multi-part message in MIME format.
--------------050202080009080507070501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 21/05/14 08:47, Vicente J. Botet Escriba a =E9crit :
> Le 20/05/14 19:00, Artur Laksberg a =E9crit :
>> This is described in N3857 on page 6: "The lambda function takes a
>> future as its input which carries the exception through."
>>
>> I admit this is imprecise. I'll make sure it's clearly stated in the dra=
ft concurrency TS that I'm submitting this week.
>>
>
> Isn't this in contradiction with the following Requires clause?
>
> 2.4 Class |executor|
> |void executor::add(std::function  closure);|
>
> 11 Requires:
>     The invoked closure should not throw an exception.
>
Forget this point. executor::add has no means to transfer the exceptions.

Vicente

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

--------------050202080009080507070501
Content-Type: text/html; charset=ISO-8859-1

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 21/05/14 08:47, Vicente J. Botet
      Escriba a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote cite="mid:537C4C0F.4070106@wanadoo.fr" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Le 20/05/14 19:00, Artur Laksberg a
        &eacute;crit&nbsp;:<br>
      </div>
      <blockquote
cite="mid:b5d0eff90e354ed380319859a96764e0@BY2PR03MB176.namprd03.prod.outlook.com"
        type="cite">
        <pre wrap="">This is described in N3857 on page 6: "The lambda function takes a
future as its input which carries the exception through."

I admit this is imprecise. I'll make sure it's clearly stated in the draft concurrency TS that I'm submitting this week.

</pre>
      </blockquote>
      <br>
      Isn't this in contradiction with the following Requires clause?<br>
      <br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <span class="section-number">2.4</span> Class <code>executor</code><span
        class="section-number"></span><br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <pre><code><cxx-signature>void executor::add(std::function<void> closure);</void></cxx-signature></code></pre>
      <br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <cxx-requires para_num="14" id="executors.base.executor.14"> <dt>11

          Requires:</dt>
        <dd> The invoked closure should not throw an exception.</dd>
      </cxx-requires><br>
      <br>
    </blockquote>
    Forget this point. executor::add has no means to transfer the
    exceptions.<br>
    <br>
    Vicente<br>
    <br>
  </body>
</html>

<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 email to <a href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

--------------050202080009080507070501--

.