I am using boost::thread for starting a member function of an object in a seperate thread.
This works for an example like this:

ProcessData *data = new ProcessData();
ProcessManager *pm = new ProcessManager();
boost::thread t1(&ProcessManager::start, boost::ref(pm), data);

Unfortunately I am not using the ProcessManager directly but a Controller which uses a self implemented callback functionality. It looks like this:

typedef Callback1 startProcessingEvent;
startProcessingEvent::Signal onStartProcessing;


The ProcessManager is binded to this event and I could call the method like

myController->onStartProcessing(data);

so in the end the ProcessManager->start is called through the Controller.
If I know want to run the same thing in a separate thread I cannot just do this:

boost::thread t1(&Controller::onStartProcessing, boost::ref(myController), data);

because boost does not understand the whole callback thing.
Does anyone has an idea how to solve the problem?

Thanks

View this message in context: Boost Thread with own Callback implementation
Sent from the Boost - Users mailing list archive at Nabble.com.