in reply to perl/tk script freezes
Actually it look very easy to convert to threads.... just make your StrtScan sub a thread, create it before any Tk code is called, and remove any Tk code from it. Set up some shared variables, and a Tk::timer to read them from the thread, for inter-thread communication.
I'm not familiar with Net::SNMP, but there MAY be a mechanism to get your script to work, like setting a timeout and running do_one_loop at each timeout, or possible Net::SNMP has a hook to run external code, in which you can do_one_loop.
|
|---|