You could follow a suggestion BrowserUK gave to me - put the non-thread safe bits of your code in another script, then use open() (or IPC::Open2 if you need bi-di communication) in the original script to communicate with the second script in another process, thus bypassing any thread safety issues.
My issue was with Crypt::SSLeay but the solution should work well for you too.
In reply to Re: Net::SSH2 not thread safe?
by onelesd
in thread Net::SSH2 not thread safe?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |