Subj : Re: boost::threads entry point functor cannot by noncopyable? To : comp.programming.threads From : Ulrich Eckhardt Date : Fri Jan 14 2005 06:38 am isaac wrote: > It seems that if you want to wrap an entry point to a boost::thread in > a functor, that functor must be copyable ( have a copy constructor ). > Why is this so? All algos in the standardlib require the functor to be copyable. > And what are the best workarounds? ( say if your > functor uses a mutex which is defined as noncopyable ). boost::ref, probably. Other than that, I don't use custom functors at all for this: If I have an object (I mean a first-class object representing the working-data of a thread) it also has a function called thread_entry() which I then boost::bind together and pass to thread's ctor. Uli .