pthread_cancel - It's always DNS!
You probably know about threads and most likely header of pthreads, but have you ever used pthread_cancel()? Well, I had not before last week and it was a little bit of a journey.
What’s the problem? curl (or better libcurl) runs all transfers in the same thread (You can run libcurl in several threads, but that’s a story for another post).
So, libcurl does not use threads, right? Well, maybe. If your curl is linked with c-ares for resolving, it does not. But without c-ares it tries to use threads, where available, for the “AsynchDNS” feature.
localhost:1313 · icing's blog