Subject: Re: Libss2 in multithread environment

Re: Libss2 in multithread environment

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 21 Apr 2010 11:16:47 +0200 (CEST)

On Wed, 21 Apr 2010, Babaladi, Prabhanand wrote:

> 2. In a multithread environment, each thread is sharing this session in
> synchronized manner and getting the channels.
>
> 3. Using channel which got above step execute the command and read output.

So only one thread at a time is using the single libssh2 session? Why use
multiple threads at all then?

Which crypto lib are you using? Both OpenSSL and gcrypt require mutex
callbacks to be setup for multi-threading to work properly, and even though
I'm not sure about the exact requirements it should be worth at least trying
that.

> I am using libssh2 version 1.2.3 and build with VC++ 8 and code generation
> setting as "Multi-threaded (/MT)".

We recommend you use libssh2 version 1.2.5.

If we don't have any docs on libssh2 done multi-threaded, I figure we should
write some...

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-04-21