On Sat, 16 May 2009, Roman Kubiak wrote:
> I get an assertion from libssh2, almost all the time when i try to close a
> channel that i don't want to use anymore:
>
> /* if remainbuf turns negative we have a bad internal error */
>assert(remainbuf >= 0);
>
> this happens on linux and
before i do that the first thing i should've asked is
are the channels session thread safe
i mean i set up one session and many channels, each channel gets it's own thread
so if libssh2 is not thread aware i need to do locking so that only
one thread has
access to one channel at a time, am i right
On Tue, 19 May 2009, Roman Kubiak wrote:
> before i do that the first thing i should've asked is are the channels
> session thread safe
Please don't do those very confusing top-posts.
libssh2 is thread-safe, but sessions must not be used in more than one thread
at a time, and all handles that
Daniel Stenberg wrote:
> > one session and many channels, each channel gets it's own thread
>
> ... is thus doomed to fail.
There was a bit of discussion about this on IRC. It might be nice to
have a compile time decision for automatic channel thread safety.
//Peter
---
On Tue, 19 May 2009, Peter Stuge wrote:
> There was a bit of discussion about this on IRC. It might be nice to have a
> compile time decision for automatic channel thread safety.
It could even be made with optional mutex callbacks, like OpenSSL and gcrypt
do thread-safety.
This said, it should