Boost logo

Boost :

From: Jacques Kerner (jacques.kerner_at_[hidden])
Date: 2003-04-30 07:44:47


I get the following error :

error C2664: 'void boost::function0<R,Allocator>::assign_to(Functor)' :
unable to convert parameter 1 from 'const CTaskManager' to 'CTaskManager'

when doing this :

class CTaskManager
        void operator()() {}
        boost::mutex m_mutex;


CTaskManager taskManager;
boost::thread_group mainThreadGroup;

The error dissapears when I remove the mutex from the definition of
CTaskManager ... (?!!)

So what is the right way to use mutex and threads together? Do I have to
declare the mutex outside of the
functor? Why?

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