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

Multithreading question


Until now I have been using libssh on the main thread. But It is annoying
as it will sometimes freeze the UI. Network woes sometimes makes UI
freezing and that isn't nice. So I want to move all operations to another
thread. But I have questions that I cannot find answers to:
1. If I store session in Main UI and pass it in every thread (sometimes
mutiple threads will be running under same session) do I have to do locking
or libssh provides one? The docs on MT seems to indicate that for dynamic
linked DLL

2. I plan to create new sftp object per thread with sftp_new(). What is the
performance impact compared to psersisting it?

3. I plan to create new channel for each command from same session when
sending a command. How much is performance impacted compared to persisting
a channel

I do simple command for file management via SFTP (CRUD) plus sending some
commands to remote SSH server.

Thank you.

-- 
for me to live is Christ to die is gain

Archive administrator: postmaster@lists.cynapses.org