I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-04-25 14:31:29-07 by yantisj
Net::Appliance::Session with Threads
Oliver, I am trying to accomplish the same thing with threads as Miky moving from Net::Telnet::Cisco. I can fall back to fork() if I have to, but somehow Net::Telnet::Cisco avoids this issue with threads. I have run in to a signaling issue on timeouts connecting to a host using Net::Telnet that will kill off my threads, so likely it is not fully thread-safe. It was related to $SIG{ALRM}. Perhaps your method for timeout on prompt is running in to a similar issue. I have to say I'm no expert on this, but somehow Net::Telnet::Cisco avoids the issue with threads. Other than that it looks like a great library that I can use in other areas that don't require parallel jobs. Thanks
Direct Responses: 7802 | Write a response
Posted on 2008-05-01 18:55:25-07 by oliver in response to 7766
Re: Net::Appliance::Session with Threads
Hi, cpanforum@cpanforum.com wrote: | I have run in to a signaling issue on timeouts connecting to a host | using Net::Telnet that will kill off my threads, so likely it is not | fully thread-safe. It was related to $SIG{ALRM}. Perhaps your | method for timeout on prompt is running in to a similar issue. In my module, Net::Appliance::Session, there is no alarm or timeout handling code. This module is a wrapper around Net::Telnet, and uses it for all alarm and timeout functions. Therefore, as you say, it's likely that Net::Telnet is not fully thread safe. In that case, there is not a lot I can do, except suggest you ask the author of Net::Telnet. | I can fall back to fork() if I have | to, but somehow Net::Telnet::Cisco avoids this issue with threads. If you can provide a code example (test case) where something fails under Net::Appliance::Session (in Telnet Transport mode) but succeeds under Net::Telnet::Cisco, then it would be very useful and I might be able to find out if Net::Telnet::Cisco is in fact working around this problem in Net::Telnet, as you suggest. regards, oliver.
Direct Responses: Write a response