I have a working class like below:
class Worker{ public: int Do(){ int ret = 100;
It is designed to run with boost :: thread and boost :: bind, for example:
Worker worker; boost::function<int()> th_func = boost::bind(&Worker::Do, &worker); boost::thread th(th_func); th.join();
My question is: how do I get the return value of Worker :: Do?
Thanks in advance.
c ++ boost boost-bind boost-thread boost-function
He shiming
source share