Hi Daniel, Many thanks for your answer. Indeed I was able to build with the --disable-threaded-resolver option to configure and that solved the problem.
>From the documentation I could not find any bad consequences other than the name resolution blocking but this is no worries for me as I run in our internal network and I doubt the DNS would take long. Also that only happens a few times at the start of the whole process. Are there any other bad consequences I should be aware of? Thanks again for your swift answer. Best, Thomas On Tue, Jul 19, 2022 at 11:24 AM Daniel Stenberg <[email protected]> wrote: > On Tue, 19 Jul 2022, Thomas de Toulmon via curl-library wrote: > > > I have the following issue in my code. I call curl_easy_perform (via the > cpr > > library) and it spawns a new thread. I was able to verify that this is > > precisely the call to curl_easy_perform that spawns a new thread and > > terminates it before returning. > > > > Is there a way I can prevent this from happening? I.e. to have > > curl_easy_perform run in the current thread and prevent it from spawning > a > > new thread? > > If you use a libcurl built to use the threaded resolver (which is the > default > one), libcurl will fire up a new thread for resolving names. That's a > built-in > choice. The thread is only used for resolving names and nothing else. > > You can opt to build libcurl with the stock synch resolver or with c-ares, > but > those choices then come with other possible downsides. > > -- > > / daniel.haxx.se > | Commercial curl support up to 24x7 is available! > | Private help, bug fixes, support, ports, new features > | https://curl.se/support.html > -- Thomas Bottée de Toulmon Market Microstructure Analyst Oryctérope Transalpin SARL, a TransMarket Group Company Rue du Léman 18A, 1920 Martigny +41 27 544 0905 | [email protected]
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html
