Upgrade libuv to fce90652ed38ab0925131ed141972354a494933b
This commit is contained in:
parent
aab958b713
commit
6ed721afd2
14
deps/uv/src/win/core.c
vendored
14
deps/uv/src/win/core.c
vendored
@ -204,13 +204,8 @@ static void uv_poll_ex(uv_loop_t* loop, int block) {
|
|||||||
uv_idle_invoke((loop)); \
|
uv_idle_invoke((loop)); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/* Completely flush all pending reqs and endgames. */ \
|
uv_process_reqs((loop)); \
|
||||||
/* We do even when we just called the idle callbacks because those may */ \
|
uv_process_endgames((loop)); \
|
||||||
/* have closed handles or started requests that short-circuited. */ \
|
|
||||||
while ((loop)->pending_reqs_tail || (loop)->endgame_handles) { \
|
|
||||||
uv_process_endgames((loop)); \
|
|
||||||
uv_process_reqs((loop)); \
|
|
||||||
} \
|
|
||||||
\
|
\
|
||||||
if ((loop)->refs <= 0) { \
|
if ((loop)->refs <= 0) { \
|
||||||
break; \
|
break; \
|
||||||
@ -218,7 +213,10 @@ static void uv_poll_ex(uv_loop_t* loop, int block) {
|
|||||||
\
|
\
|
||||||
uv_prepare_invoke((loop)); \
|
uv_prepare_invoke((loop)); \
|
||||||
\
|
\
|
||||||
poll((loop), (loop)->idle_handles == NULL && (loop)->refs > 0); \
|
poll((loop), (loop)->idle_handles == NULL && \
|
||||||
|
(loop)->pending_reqs_tail == NULL && \
|
||||||
|
(loop)->endgame_handles == NULL && \
|
||||||
|
(loop)->refs > 0); \
|
||||||
\
|
\
|
||||||
uv_check_invoke((loop)); \
|
uv_check_invoke((loop)); \
|
||||||
}
|
}
|
||||||
|
36
deps/uv/src/win/req.c
vendored
36
deps/uv/src/win/req.c
vendored
@ -51,27 +51,6 @@ void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static uv_req_t* uv_remove_pending_req(uv_loop_t* loop) {
|
|
||||||
uv_req_t* req;
|
|
||||||
|
|
||||||
if (loop->pending_reqs_tail) {
|
|
||||||
req = loop->pending_reqs_tail->next_req;
|
|
||||||
|
|
||||||
if (req == loop->pending_reqs_tail) {
|
|
||||||
loop->pending_reqs_tail = NULL;
|
|
||||||
} else {
|
|
||||||
loop->pending_reqs_tail->next_req = req->next_req;
|
|
||||||
}
|
|
||||||
|
|
||||||
return req;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* queue empty */
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define DELEGATE_STREAM_REQ(loop, req, method, handle_at) \
|
#define DELEGATE_STREAM_REQ(loop, req, method, handle_at) \
|
||||||
do { \
|
do { \
|
||||||
switch (((uv_handle_t*) (req)->handle_at)->type) { \
|
switch (((uv_handle_t*) (req)->handle_at)->type) { \
|
||||||
@ -101,8 +80,21 @@ static uv_req_t* uv_remove_pending_req(uv_loop_t* loop) {
|
|||||||
|
|
||||||
void uv_process_reqs(uv_loop_t* loop) {
|
void uv_process_reqs(uv_loop_t* loop) {
|
||||||
uv_req_t* req;
|
uv_req_t* req;
|
||||||
|
uv_req_t* first;
|
||||||
|
uv_req_t* next;
|
||||||
|
|
||||||
|
if (loop->pending_reqs_tail == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
first = loop->pending_reqs_tail->next_req;
|
||||||
|
next = first;
|
||||||
|
loop->pending_reqs_tail = NULL;
|
||||||
|
|
||||||
|
while (next != NULL) {
|
||||||
|
req = next;
|
||||||
|
next = req->next_req != first ? req->next_req : NULL;
|
||||||
|
|
||||||
while (req = uv_remove_pending_req(loop)) {
|
|
||||||
switch (req->type) {
|
switch (req->type) {
|
||||||
case UV_READ:
|
case UV_READ:
|
||||||
DELEGATE_STREAM_REQ(loop, req, read, data);
|
DELEGATE_STREAM_REQ(loop, req, read, data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user