cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sftp multi thread init question

From: ΑυΣ’Ξ° <506017026_at_qq.com>
Date: Thu, 20 Feb 2014 22:33:51 +0800

now it on the list !!!
I do not know what makes it return 2 . The error code say init failed . There is a little information about the code <2>.But what makes it,can you tell me? Is the test code wrong? why does it init 10 threads successfully every time ?
Thank you!






------------------ Original ------------------
From: "daniel";<daniel_at_haxx.se>;
Date: Thu, Feb 20, 2014 05:27 PM
To: "libcurl development"<curl-library_at_cool.haxx.se>;

Subject: Re: sftp multi thread init question



On Thu, 20 Feb 2014, ?????? wrote:

> I use multi thread to list dir on sftp in my test code.
> There are 30 dirs and 30 threads.
> I also use openssl pthread_mutex to prevent crash.
>
> In test code, I list three times, the first time there are 10 threads list
> successfully and return 0, the other return error code 2. the second time
> there are 20 threads list successfully include the count of first time list
> success,the third time ,all of the 30 threads are list successfully.
>
> I think it init 10 threads successfully every time and init other 10 threads
> successfully next time.But why is 10???? where is the limit????

What makes it return 2 (CURLE_FAILED_INIT) and why? Answer that and you'll
probably know the answer to the rest...

--

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-20