Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][thread] Future returning 0xfeeefeee
From: Stefan Strasser (strasser_at_[hidden])
Date: 2013-04-06 19:44:06


Zitat von Klaim - Joël Lamotte <mjklaim_at_[hidden]>:

> On Sun, Apr 7, 2013 at 1:02 AM, Klaim - Joël Lamotte
> <mjklaim_at_[hidden]>wrote:
>
>> So the promise is destroyed before setting the value to the future.
>
>
> Sorry, I meant: the promise is (a priori) guaranteed to be destroyed AFTER
> having set the value to the future.
>
> Joel Lamotte
>

I was under the impression that the promise object itself has to be
alive when the future result is used. and since you're emptying your
queue on execution it's not.
but considering that the promise object could be in another thread
that was probably a false impression.
Which compiler does this even work with yet? Both gcc and clang fail.
clang on compilation, gcc compiles it but fails at runtime with a
system_error exception and an invalid error code.
so you might wanna consider compiler and library bugs, too.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net