mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
async-thrdd: use thread queue for resolving
Use a thread queue and pool for asnyc threaded DNS resolves. Add pytest test_21_* for verification. Add `CURLMOPT_RESOLVE_THREADS_MAX` to allow applications to resize the thread pool used. Add `CURLMOPT_QUICK_EXIT` to allow applications to skip thread joins when cleaning up a multi handle. Multi handles in `curl_easy_perform()` inherit this from `CURLOPT_QUICK_EXIT`. Add several debug environment variables for testing. Closes #20936
This commit is contained in:
parent
507e7be573
commit
39036c9021
31 changed files with 998 additions and 614 deletions
|
|
@ -109,6 +109,9 @@ struct Curl_multi {
|
|||
|
||||
struct Curl_dnscache dnscache; /* DNS cache */
|
||||
struct Curl_ssl_scache *ssl_scache; /* TLS session pool */
|
||||
#ifdef USE_RESOLV_THREADED
|
||||
struct curl_thrdq *resolv_thrdq;
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBPSL
|
||||
/* PSL cache. */
|
||||
|
|
@ -186,6 +189,7 @@ struct Curl_multi {
|
|||
BIT(xfer_buf_borrowed); /* xfer_buf is currently being borrowed */
|
||||
BIT(xfer_ulbuf_borrowed); /* xfer_ulbuf is currently being borrowed */
|
||||
BIT(xfer_sockbuf_borrowed); /* xfer_sockbuf is currently being borrowed */
|
||||
BIT(quick_exit); /* do not join threads on cleanup */
|
||||
#ifdef DEBUGBUILD
|
||||
BIT(warned); /* true after user warned of DEBUGBUILD */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue