Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-02-10 11:15:31


"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.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk