in reply to SSH by thread
Based on nothing more than the little you've said in your post -- ie. no first hand experience whatsoever -- it sounds like the library you are using is not thread-safe.
So, as you say "if I run it in main,it runs well.", why bother trying to run it in a thread?
That is to say, if you need to do other stuff concurrently, run that other stuff in the thread, and leave this bit to run in main.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SSH by thread
by Anonymous Monk on May 14, 2015 at 19:51 UTC |