"William E. Kempf" <[EMAIL PROTECTED]> writes: >> From: David Abrahams <[EMAIL PROTECTED]> Date: 2003/02/10 >> Mon AM 11:15:31 EST To: Boost mailing list <[EMAIL PROTECTED]> >> Subject: Re: [boost] Re: A new boost::thread implementation? >> >> "William E. Kempf" <[EMAIL PROTECTED]> 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.
I don't have an opinion. The answer may depend on the relative expense of acquiring the asynchronous executor resource (thread). -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost