fixup! fixup! fixup! fixup! fixup! win: track each write_req in a queue instead of just a count

This commit is contained in:
Jameson Nash 2026-03-15 10:46:29 -04:00
parent 24e3cdd4d3
commit bf934d7597
4 changed files with 6 additions and 2 deletions

View File

@ -2166,7 +2166,9 @@ void uv__process_pipe_write_req(uv_loop_t* loop, uv_pipe_t* handle,
uv__free(coalesced_write);
}
if (req->cb) {
handle->flags |= UV_HANDLE_IN_WRITE_CB;
req->cb(req, uv_translate_sys_error(err));
handle->flags &= ~UV_HANDLE_IN_WRITE_CB;
}
if (handle->flags & UV_HANDLE_NON_OVERLAPPED_PIPE &&

View File

@ -155,9 +155,7 @@ INLINE static void uv__process_reqs(uv_loop_t* loop) {
break;
case UV_WRITE:
((uv_write_t*) req)->handle->flags |= UV_HANDLE_IN_WRITE_CB;
DELEGATE_STREAM_REQ(loop, (uv_write_t*) req, write, handle);
((uv_write_t*) req)->handle->flags &= ~UV_HANDLE_IN_WRITE_CB;
break;
case UV_ACCEPT:

View File

@ -1103,7 +1103,9 @@ void uv__process_tcp_write_req(uv_loop_t* loop, uv_tcp_t* handle,
/* use UV_ECANCELED for consistency with Unix */
err = UV_ECANCELED;
}
handle->flags |= UV_HANDLE_IN_WRITE_CB;
req->cb(req, err);
handle->flags &= ~UV_HANDLE_IN_WRITE_CB;
}
if (uv__queue_empty(&handle->stream.conn.write_queue)) {

View File

@ -2208,7 +2208,9 @@ void uv__process_tty_write_req(uv_loop_t* loop, uv_tty_t* handle,
if (req->cb) {
err = GET_REQ_ERROR(req);
handle->flags |= UV_HANDLE_IN_WRITE_CB;
req->cb(req, uv_translate_sys_error(err));
handle->flags &= ~UV_HANDLE_IN_WRITE_CB;
}