All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

curl Removes pthread_cancel Implementation After DNS Resolution Issues

By

robin_reala

8mo ago· 3 min readenInsight

Summary

The curl project added pthread_cancel functionality in version 8.16.0 to handle DNS resolution timeouts by using pthreads to call getaddrinfo() in separate threads, allowing libcurl to continue other operations. However, this implementation caused significant issues and is being removed in the next release (#18540) due to problems with the pthread cancellation mechanism.

Key quotes

· 4 pulled
we released this in curl 8.16.0 and it blew up right in our faces
pthreads define "Cancelation points", a list of POSIX functions where a pthread may be cancelled
getaddrinfo() is exactly what we are interested in for libcurl. It blocks until it has resolved a name
That may hang for a long time and libcurl is unable to do anything else
Snippet from the RSS feed
I posted about adding pthread_cancel use in curl about three weeks ago, we released this in curl 8.16.0 and it blew up right in our faces. Now, with #18540 we are ripping it out again. What happened? short recap pthreads define “Cancelation points”, a lis

You might also wanna read