Boost logo

Boost :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-02-10 11:33:49

> From: David Abrahams <dave_at_[hidden]>
> Date: 2003/02/10 Mon AM 11:15:31 EST
> To: Boost mailing list <boost_at_[hidden]>
> Subject: Re: [boost] Re: A new boost::thread implementation?
> "William E. Kempf" <wekempf_at_[hidden]> writes:
> > Actually, there's another minor issue as well. The user can call
> > operator() and then let the async_call go out of scope with out ever
> > calling result(). Mayhem would ensue. The two options for dealing
> > with this are to either block in the destructor until the call has
> > completed or to simply document this as undefined behavior.
> If you want async_call to be copyable you'd need to have a handle-body
> idiom anyway, and something associated with the thread could be used
> to keep the body alive.

True enough. The code provided by Mr. Dimov wasn't copyable, however. Is it important enough to allow copying to be worth the issues involved with dynamic memory usage here (i.e. a point of failure in the constructor)? I think it probably is, I just want to see how others feel.

William E. Kempf

Boost list run by bdawes at, gregod at, cpdaniel at, john at