C++0x, thread, promise and future
Claudio La Rosa
clros@tiscali.it
Sat Jul 16 14:58:00 GMT 2011
Jonathan Wakely-4 wrote:
>
>
>
> Are you sure you get a segfault? You should get an exception in the
> myAsyncFun thread, which is not caught so the program calls
> std::teminate
>
Yes, I have a segmentation fault.
Jonathan Wakely-4 wrote:
>
> You can't use a promise more than once, so your loop will always fail
> on the second iteration.
>
Ok!
Then this is the problem.
But there is no way to create a promise that always works?
Jonathan Wakely-4 wrote:
>
> Also, as matters of style, you don't need to create the std::thread
> using 'new' but if you do then you should delete it.
>
>
Ok!
--
View this message in context: http://old.nabble.com/C%2B%2B0x%2C-thread%2C-promise-and-future-tp32072781p32074126.html
Sent from the gcc - Help mailing list archive at Nabble.com.
More information about the Gcc-help
mailing list