Thanks, Peter. I could understand. I intend to create sessions against each thread, and handshake for each them.
-Yoichiro 2015-01-27 0:52 GMT+09:00 Peter Stuge <pe...@stuge.se>: > Yoichiro Tanaka wrote: > > (1) Are "libssh2_sftp_*" functions thread-safe? > > No. > > > (3) If a lock (ex. mutex) is necessary, where I should apply the lock > > against my code? > > To be really safe, around any atomic operation relating to a > libssh2_session. Very coarse locking. > > If you want, you can investigate if perhaps multiple SFTP channels > will work correctly, but I doubt it, because the session IO is not > thread-capable. > > > > (4) Is there any sample code to use libssh2 in the multi-threading > > environment? > > Unfortunately not. > > > //Peter > _______________________________________________ > libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel > -- Yoichiro Tanaka Email: yoich...@eisbahn.jp Blog: http://www.eisbahn.jp/yoichiro
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel