]> git.ipfire.org Git - thirdparty/curl.git/commit
async-threaded resolver: use ref counter
authorStefan Eissing <stefan@eissing.org>
Wed, 2 Apr 2025 10:25:21 +0000 (12:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Apr 2025 14:43:37 +0000 (16:43 +0200)
commit9b6148e9d95db54a752b03b571296c40d66e97fe
treedf53a08933082374d056b18d81a43dec4a468408
parent01e76702aca1ef893d0e653a70b3261ae61899d3
async-threaded resolver: use ref counter

Allocate the data shared between a transfer and an aync resolver thread
separately and use a reference counter to determine its release.

Change `Curl_thread_destroy()` to clear the thread handle, so that the
thread is considered "gone" and we do not try to join (and fail to)
afterwards.

Retake of the revert in fb15a986c0d947ae6b9dd6

Closes #16916
lib/asyn-ares.c
lib/asyn-thread.c
lib/asyn.h
lib/curl_threads.c
lib/curl_threads.h
lib/multi.c
lib/socks.c
tests/libtest/lib3207.c