in reply to endless loops for server and tk
This way the main loop initializes itself and renders your window, but then your code takes over and does the GUI update as often as needed.# setup MainWindow $mw # setup socket with timeout sub myloop { while (1) { #read from socket; #if anything read, deal with it; $mw->update(); } } $mw->after(1, \&myloop); MainLoop;
|
|---|