in reply to Perl/Tk while {1} and a responsive UI

Take a look at 372499 for one way to do long running tasks whilst retaining UI responsiveness in tk.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?

Replies are listed 'Best First'.
Re^2: Perl/Tk while {1} and a responsive UI
by Courage (Parson) on Apr 24, 2005 at 11:28 UTC
    Tk and threads are very hard to cooperate, they are mostly not compatible, as many sources say.

    To write threaded Tk program, many many actions should be taken

      Tk with threads are nothing to fear of. Yes, it's not trivial. But GUIs + threads are hardly a triviality in any language. And yet, it's being done, and many programs have GUIs and several threads, including in Perl/Tk.
        well, your second sentence immediately makes untrue first sentence :)

        No offence!
        Yet I appplause very much your effort with Marrying Tk, threads and SerialPort - a COM port monitor.

        But you either "nothing to fear of", or "not trivial" (meaning you must take special care of threading, especially coonsidering weak internal threads in perl, so you must always switch to OS API for reliable threads)

        As to add a little bit, Tcl::Tk is more lightweight than Tk , so your experiments on trying Tk to have less CPU cycles (as to allow more COM processing) are better done with Tcl::Tk.