[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 40/151: curl: add --parallel-immediate
From: |
gnunet |
Subject: |
[gnurl] 40/151: curl: add --parallel-immediate |
Date: |
Fri, 20 Dec 2019 14:25:49 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 215baa74f709cd5026ea037eb9204cee93baa1bb
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Oct 17 10:05:53 2019 +0200
curl: add --parallel-immediate
Starting with this change when doing parallel transfers, without this
option set, curl will prefer to create new transfers multiplexed on an
existing connection rather than creating a brand new one.
--parallel-immediate can be set to tell curl to prefer to use new
connections rather than to wait and try to multiplex.
libcurl-wise, this means that curl will set CURLOPT_PIPEWAIT by default
on parallel transfers.
Suggested-by: Tom van der Woerdt
Closes #4500
---
docs/cmdline-opts/Makefile.inc | 3 ++-
docs/cmdline-opts/parallel-immediate.d | 9 +++++++++
src/tool_cfgable.h | 1 +
src/tool_getparam.c | 4 ++++
src/tool_help.c | 2 ++
src/tool_operate.c | 4 ++++
6 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/docs/cmdline-opts/Makefile.inc b/docs/cmdline-opts/Makefile.inc
index c90e9c5fb..fd29dfb23 100644
--- a/docs/cmdline-opts/Makefile.inc
+++ b/docs/cmdline-opts/Makefile.inc
@@ -103,9 +103,10 @@ DPAGES = \
ntlm.d ntlm-wb.d \
oauth2-bearer.d \
output.d \
+ parallel-immediate.d \
+ parallel-max.d \
parallel.d \
pass.d \
- parallel-max.d \
path-as-is.d \
pinnedpubkey.d \
post301.d \
diff --git a/docs/cmdline-opts/parallel-immediate.d
b/docs/cmdline-opts/parallel-immediate.d
new file mode 100644
index 000000000..343931085
--- /dev/null
+++ b/docs/cmdline-opts/parallel-immediate.d
@@ -0,0 +1,9 @@
+Long: parallel-immediate
+Help: Do not wait for multiplexing (with --parallel)
+Added: 7.68.0
+See-also: parallel parallel-max
+---
+When doing parallel transfers, this option will instruct curl that it should
+rather prefer opening up more connections in parallel at once rather than
+waiting to see if new transfers can be added as multiplexed streams on another
+connection.
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
index 7232c35e3..4372cc6fc 100644
--- a/src/tool_cfgable.h
+++ b/src/tool_cfgable.h
@@ -300,6 +300,7 @@ struct GlobalConfig {
#endif
bool parallel;
long parallel_max;
+ bool parallel_connect;
struct OperationConfig *first;
struct OperationConfig *current;
struct OperationConfig *last; /* Always last in the struct */
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 3882cb97e..75faff34d 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -321,6 +321,7 @@ static const struct LongShort aliases[]= {
{"z", "time-cond", ARG_STRING},
{"Z", "parallel", ARG_BOOL},
{"Zb", "parallel-max", ARG_STRING},
+ {"Zc", "parallel-immediate", ARG_BOOL},
{"#", "progress-bar", ARG_BOOL},
{"#m", "progress-meter", ARG_BOOL},
{":", "next", ARG_NONE},
@@ -2154,6 +2155,9 @@ ParameterError getparameter(const char *flag, /* f or
-long-flag */
(global->parallel_max < 1))
global->parallel_max = PARALLEL_DEFAULT;
break;
+ case 'c': /* --parallel-connect */
+ global->parallel_connect = toggle;
+ break;
}
break;
case 'z': /* time condition coming up */
diff --git a/src/tool_help.c b/src/tool_help.c
index 022956676..21900108b 100644
--- a/src/tool_help.c
+++ b/src/tool_help.c
@@ -279,6 +279,8 @@ static const struct helptxt helptext[] = {
"Write to file instead of stdout"},
{"-Z, --parallel",
"Perform transfers in parallel"},
+ {" --parallel-immediate",
+ "Do not wait for multiplexing (with --parallel)"},
{" --parallel-max",
"Maximum concurrency for parallel transfers"},
{" --pass <phrase>",
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 4ecb1ed5f..0de81cd49 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1976,6 +1976,10 @@ static CURLcode add_parallel_transfers(struct
GlobalConfig *global,
if(result)
break;
+ /* parallel connect means that we don't set PIPEWAIT since pipewait
+ will make libcurl prefer multiplexing */
+ (void)curl_easy_setopt(per->curl, CURLOPT_PIPEWAIT,
+ global->parallel_connect ? 0L : 1L);
(void)curl_easy_setopt(per->curl, CURLOPT_PRIVATE, per);
(void)curl_easy_setopt(per->curl, CURLOPT_XFERINFOFUNCTION, xferinfo_cb);
(void)curl_easy_setopt(per->curl, CURLOPT_XFERINFODATA, per);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 17/151: pause: avoid updating socket if done was already called, (continued)
- [gnurl] 17/151: pause: avoid updating socket if done was already called, gnunet, 2019/12/20
- [gnurl] 25/151: multi_poll: avoid busy-loop when called without easy handles attached, gnunet, 2019/12/20
- [gnurl] 27/151: config-win32: cpu-machine-OS for Windows on ARM, gnunet, 2019/12/20
- [gnurl] 33/151: ngtcp2: handle key updates as ngtcp2 master branch tells us, gnunet, 2019/12/20
- [gnurl] 32/151: multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds, gnunet, 2019/12/20
- [gnurl] 29/151: doh: improced both encoding and decoding, gnunet, 2019/12/20
- [gnurl] 28/151: ngtcp2: increase QUIC window size when data is consumed, gnunet, 2019/12/20
- [gnurl] 34/151: ngtcp2: free used resources on disconnect, gnunet, 2019/12/20
- [gnurl] 45/151: openssl: Revert to less sensitivity for SYSCALL errors, gnunet, 2019/12/20
- [gnurl] 44/151: openssl: improve error message for SYSCALL during connect, gnunet, 2019/12/20
- [gnurl] 40/151: curl: add --parallel-immediate,
gnunet <=
- [gnurl] 37/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 42/151: include: make CURLE_HTTP3 use a new error code, gnunet, 2019/12/20
- [gnurl] 39/151: docs: fix typos, gnunet, 2019/12/20
- [gnurl] 30/151: INSTALL.md: provide Android build instructions, gnunet, 2019/12/20
- [gnurl] 43/151: test1175: verify symbols-in-versions and libcurl-errors.3 in sync, gnunet, 2019/12/20
- [gnurl] 41/151: bump: next release will be 7.68.0, gnunet, 2019/12/20
- [gnurl] 35/151: altsvc: bump to h3-24, gnunet, 2019/12/20
- [gnurl] 36/151: ngtcp2: use overflow buffer for extra HTTP/3 data, gnunet, 2019/12/20
- [gnurl] 31/151: lib: Move lib/ssh.h -> lib/vssh/ssh.h, gnunet, 2019/12/20
- [gnurl] 46/151: RELEASE-NOTES: synced, gnunet, 2019/12/20