curl默认情况下有两个地方是线程不安全的, 需要特殊处理,
1,是curl_global_init 这个函数必须单线程调用,
2,是默认多线程调用https会莫名其妙的挂掉, 以下是网上的解决方案
https://curl.haxx.se/libcurl/c/opensslthreadlock.html
https://curl.se/libcurl/c/threaded-ssl.html
https://blog.csdn.net/jaylong35/article/details/6988690
https://www.jianshu.com/p/5b43cdd73d58
3, curl_setopt(curl, CURLOPT_NOSIGNAL, 1L);