title: boost asio post not working , io_service::run exits right after post
body: <p>I am trying to mix boost signals with asio to do a dispatch based handler invocation. when the post method is invoked from a thread the io_service::run exits immediately, the callback handled to post is never invoked, callback is a C++11 lambda routine. I am pasting the code for more analysis. </p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;thread&gt;
  #include&lt;boost/signals2/signal.hpp&gt;
  #include&lt;boost/asio.hpp&gt;
  
  static boost::asio::io_service svc;
  static boost::signals2::signal&lt;void(std::string)&gt; textEntered;
  
  static void
  handleInputText(std::string text)
  {
      std::cout&lt;&lt;"handleInputText()"&lt;&lt;" text provided: "&lt;&lt;text;
      return;
  }
  
  static void 
  worker()
  {
      sleep(2);
      svc.post([](){
              std::cout&lt;&lt;"\nRaising signal.";
              std::string hello("hello world");
              textEntered(hello);
              });
      return;
  }
  
  int main(int ac, char **av)
  {
      try
      {
          textEntered.connect(&amp;handleInputText);
          std::thread w(std::bind(&amp;worker));
          svc.run();
          w.join();
      }
      catch(std::exception &amp;ex)
      {
          std::cerr&lt;&lt;"main() exited with exception:"&lt;&lt;ex.what();
      }
      return 0;
  }
  </code></pre>