title: When do I have to use boost::asio:strand
body: <p>Reading the document of boost::asio, it is still not clear when I need to use  asio::strand. Suppose that I have one thread using  io_service is it then safe to write on a socket as follows ?</p>
  
  <pre><code>void Connection::write(boost::shared_ptr&lt;string&gt; msg)
  {
      _io_service.post(boost::bind(&amp;Connection::_do_write,this,msg));
  }
  
  void Connection::_do_write(boost::shared_ptr&lt;string&gt; msg)
  {
      if(_write_in_progress)
      {
        _msg_queue.push_back(msg);
      }
      else
      {
        _write_in_progress=true;
        boost::asio::async_write(_socket, boost::asio::buffer(*(msg.get())),
        boost::bind(&amp;Connection::_handle_write,this,
               boost::asio::placeholders::error));
      }
  }
  
  void Connection::_handle_write(boost::system::error_code const &amp;error)
  {
    if(!error)
    {
      if(!_msg_queue.empty())
      {
            boost::shared_ptr&lt;string&gt; msg=_msg_queue.front();
        _msg_queue.pop_front();
        boost::asio::async_write(_socket, boost::asio::buffer(*(msg.get())),
             boost::bind(&amp;Connection::_handle_write,this,
                     boost::asio::placeholders::error));
          }
      else
      {
        _write_in_progress=false;
      }
    }
  }
  </code></pre>
  
  <p>Where multiple threads calls Connection::write(..) or do I have to use asio::strand ?</p>