Kamil Dudka on Saturday, March 07, 2009 2:32 PM: > > Thanks for explanation. So the proper solution is to fix all the code > using > libcurl to call curl_global_init() at first, starting with the curl > tool. > Worth to write a patch? > > Kamil >
If you do, may I suggest adding a big comment at the curl_global_init() call advising programmers about the restrictions on when/where curl_global_init() should be called, w.r.t. multi-threaded apps? After reading this list for several years, it is one of the most-often seen (and least understood) issues. I'm only reminded now because I just refactored our libcurl code, and noticed that we are calling curl_global_init() too far into the initialization process, after other threads have already started. Gary M. Casabi, Inc.
