[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 115/219: process_pending_handles: mark queued trans
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 115/219: process_pending_handles: mark queued transfers as previously pending |
Date: |
Wed, 22 May 2019 19:17:34 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 5c8783d77f341d69e866bf0cd56836b4faea0a1f
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Apr 30 11:12:12 2019 +0200
process_pending_handles: mark queued transfers as previously pending
With transfers being queued up, we only move one at a a time back to the
CONNECT state but now we mark moved transfers so that when a moved
transfer is confirmed "successful" (it connected) it will trigger the
move of another pending transfer. Previously, it would otherwise wait
until the transfer was done before doing this. This makes queued up
pending transfers get processed (much) faster.
---
lib/multi.c | 8 ++++++++
lib/urldata.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/lib/multi.c b/lib/multi.c
index 48dadd83b..2d83e734e 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1365,6 +1365,11 @@ static CURLMcode multi_runsingle(struct Curl_multi
*multi,
result = CURLE_OK;
break;
}
+ else if(data->state.previouslypending) {
+ /* this transfer comes from the pending queue so try move another */
+ infof(data, "Transfer was pending, now try another\n");
+ process_pending_handles(data->multi);
+ }
if(!result) {
if(async)
@@ -2991,6 +2996,9 @@ static void process_pending_handles(struct Curl_multi
*multi)
/* Make sure that the handle will be processed soonish. */
Curl_expire(data, 0, EXPIRE_RUN_NOW);
+
+ /* mark this as having been in the pending queue */
+ data->state.previouslypending = TRUE;
}
}
diff --git a/lib/urldata.h b/lib/urldata.h
index 4b09f24fd..344cc472e 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1363,6 +1363,7 @@ struct UrlState {
when multi_done() is called, to prevent multi_done() to get
invoked twice when the multi interface is used. */
bit stream_depends_e:1; /* set or don't set the Exclusive bit */
+ bit previouslypending:1; /* this transfer WAS in the multi->pending queue */
};
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnurl] 115/219: process_pending_handles: mark queued transfers as previously pending,
gnunet <=