title: call uv_write from multi thread, its callback never get called
body: <p>I've read the tcp-echo-server.c example from libuv, now I'm writing a small multi-thread tcp server based on that.</p>
  
  <p>I used the <code>uv_default_loop</code> in the main thread to accept connections, and put new connection into a list.</p>
  
  <pre><code>// main thread
      uv_ip4_addr("0.0.0.0", DEFAULT_PORT, &amp;addr);
  
      uv_tcp_bind(&amp;server, (const struct sockaddr*)&amp;addr, 0);
      int r = uv_listen((uv_stream_t*) &amp;server, DEFAULT_BACKLOG, OnConnectionCallback);
      if (r)
      {
          ERROR("Listen error %s", uv_strerror(r));
          return;
      }
      uv_run(loop, UV_RUN_DEFAULT);
  
  </code></pre>
  
  <p>and in the second thread, I broadcast a message to all connections I've got.</p>
  
  <pre><code>// second thread
  
      write_req_t *req = (write_req_t*) malloc(sizeof(write_req_t));
      req-&gt;buf = uv_buf_init((char *)buffer-&gt;data(), buffer-&gt;size());
      int r = uv_write((uv_write_t*) req, (uv_stream_t *)this-&gt;uv, &amp;req-&gt;buf, 1, write_callback);
      if (r)
      {
          ERROR("uv_write error: %s", uv_strerror(ret));
      }
  </code></pre>
  
  <p>accepting connection works, reading from client works, but the writing part didn't work. no error code reported, but it's callback never got triggered.</p>
  
  <p>I went through the doc, unable to find any clue yet. What did I miss?</p>
  
  <p>by the way, I'm using <code>std::thread</code>, not the thread api from libuv.</p>