in reply to perl/tk script freezes

srry, didnt read your last comment, it does a lot more than that, but i started to split the script to find what might be the problem, until it came to this, so i think it must be the snmp_dispatcher which seem to be a loop that interferes with the Mainloop

Replies are listed 'Best First'.
Re^2: perl/tk script freezes
by pc88mxer (Vicar) on Feb 07, 2008 at 16:26 UTC
    Could it be that snmp_dispatcher() doesn't return until "all queued SNMP messages have received a response or have timed out at the Transport Layer"? So it seems that during that time Tk will never have a chance to run.

    I would consider re-architecting this so that the SNMP stuff runs in a different thread or process from the gui. Not only is this natural separation of concerns, but also your gui wouldn't freeze. Moreover, you could then use the gui to interrupt or modify the behavior of the SNMP scan. And it makes it easier to put a different "gui" on it (like a command line interface.) In any case, mixing your gui code with your scanning code is going to make it hard to change either of them.