Date: 2001-06-30 22:31:07
--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "Peter Dimov" <pdimov_at_m...>
> [Replying to myself... What's next? A dedicated mailing list just
> :-) ]
> > So my point is that a good implementation of thread::ref can
> > compete with the 'layer 1' noncopyable thread object and be an
> > magnitude more efficient than 'layer 2' shared_ptr<thread>, while
> > same time being more user-friendly.
> Reality check.
> The above is true with regard to thread-related resources, but it
> the problem with the lifetime of the arbitrary function object that
> passed to thread::create.
> A design with
> thread::ref thread::create(void (*) (void *), void *);
> plus the corresponding helpers for managing the parameter passing
> dealing with different function signatures still has the properties
> A design that takes boost::function0<void>, sadly, does not, as far
as I can
> see. Someone has to manage the function object, and the logical
place to put
> it is in the noncopyable thread.
I don't follow this. What do you mean by "manage the function
object"? Do you mean it's lifetime? There's nothing to manage there.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk