title: Getting return value from a boost::threaded member function?
body: <p>I have a worker class like the one below:</p>
  
  <pre><code>class Worker{
  public:
    int Do(){
      int ret = 100;
      // do stuff
      return ret;
    }
  }
  </code></pre>
  
  <p>It's intended to be executed with boost::thread and boost::bind, like:</p>
  
  <pre><code>Worker worker;
  boost::function&lt;int()&gt; th_func = boost::bind(&amp;Worker::Do, &amp;worker);
  boost::thread th(th_func);
  th.join();
  </code></pre>
  
  <p>My question is, how do I get the return value of Worker::Do? </p>
  
  <p>Thanks in advance.</p>