Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost::thread] interrupt a future get boost::unknown_exception
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2011-03-21 12:37:20


On Mon, 21 Mar 2011 02:27:17 +0100, 乔志强 <qiaozhiqiang_at_[hidden]>
wrote:

> It is only boost::thread
>
> int foo()
> {
> this_thread::sleep(seconds(1000));
> return 0;
> }
>
>
> int main(int argc, char** argv)
> {
> boost::packaged_task<int> pt(&foo);
>
> boost::unique_future<int> fi = pt.get_future();
> ..........................
>

The problem is reproducible with gcc 4.4.5 and boost 1.46.1 on ubuntu x86
linux. I'd classify the issue as a boost bug and submit it into tracker
unless somebody from boost::future knowers clarify the situation.

-- Slava


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