Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Net::SSH2 issue in thread

by salva (Canon)
on Aug 01, 2018 at 06:59 UTC ( [id://1219622]=note: print w/replies, xml ) Need Help??


in reply to Net::SSH2 issue in thread

Net::SSH2 is not thread safe.

You might be able to use if from one thread, as far as objects are not shared between threads (and sharing could be just letting a Net::SSH2 object be cloned by creating a new thread even if it is not used there at all, see issue 40).

I (the de-facto current maintainer of Net::SSH2) have looked into that a couple of times, but fixing all the issues involved in order to make the module just usable in a threaded environment would be a mayor effort and the reality is that I lack the time to do it. So, unless somebody volunteers to do it (or offers to fund it!) I don't see it being fixed.

Replies are listed 'Best First'.
Re^2: Net::SSH2 issue in thread
by roperl (Beadle) on Aug 01, 2018 at 15:38 UTC
    Salva,
    Thanks. I was hoping maybe there was a work around. Maybe I'll have my threaded program call another program that actually does the sftp.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219622]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found