Hi Peter,
My application is a multi threaded one with three threads, I did not implement any special call backs for thread safety. But I made sure the LIBSSH2_SESSIONs are not shared between the threads, and also the libssh2_init is called in sequential manner for all threads (once before separation of thread life, i.e. in the main thread). I did not use the function call libssh2_exit assuming my program is long running process. From my logs I did not notice any activity from my other two threads around this time. Is this insufficient to work well in my case?. Please let me know if I have done some thing seriously wrong
Thanks & Regards,Ismail Aseen
On Monday, 4 April 2016, 15:41, Peter Stuge <peter_at_stuge.se> wrote:
Ismail Aseen wrote:
> My original problem was one of my thread consuming 100% CPU while
> initiating a file transfer using libssh2.
Do you have a session mutex? libssh2 is not thread safe.
//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-04-04