in reply to Re^2: Tk and Threads (again)
in thread Tk and Threads (again)

Is this for having a second MainLoop?

No, its just a means to simplify the interaction between threads; you shouldn't need a 2nd MainLoop, just a $mw->repeat() call within the Tk thread that goes off to test the Thread::Queue every 100 msecs or so. The rest of the threads use the client proxy as a surrogate for making calls directly on $mw. (Of course, there's the little matter of marshalling params to the Tk thread, and getting results back...again, see Thread::Apartment for its marshal/unmarshal methods.)

Hopefully, I'll find time in the next couple of months to finalize Thread::Apartment support for closures, plus a few other things, and then implement a Tk::Threaded that will make all of this much simpler.

Replies are listed 'Best First'.
Re^4: Tk and Threads (again)
by Ace128 (Hermit) on Jan 23, 2006 at 22:48 UTC
    Now, that would be lovely to implement for you all actually! :)