[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[0.5] Threads?



I noticed you putting in threading logic for 0.5.  Can you tell me what the
reason for this is?


I'm wary of having threads integrated with libssh, and so far I cannot find
much reason for it.

Given that everything uses handles, all data for a session (be it a ssh
session or crypto session) should be contained within that handle, nothing
should be global or function-level static.  If this is the case, then there
should be no need for mutexes, regardless of how many ssh sessions there


Theoretically I should be able to run any number of ssh sessions from a
single thread, in which case locking is unnecessary.


The only situation I can think of requiring locks like this is the situation

Thread A receives data from transport and invokes libssh to 'notify' the
data has arrived and what it is.

Thread B needs to invoke a callback (for whatever reason) on the same


But this can still be handled without needing to implement threading
directly into libssh.



Re: [0.5] Threads?Aris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org