Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Perl/Tk and threads on Win32

by ldln (Pilgrim)
on Oct 27, 2006 at 18:08 UTC ( #580975=note: print w/replies, xml ) Need Help??

in reply to Perl/Tk and threads on Win32

My 2cents (before the experts come along) is that it works well. The thing, in addition to starting any threads before doing any work with Tk, is to start the threads as early as possible with "use" (compile time) and then "require" (runtime) as much as possible of the other modules needed, so that the stuff copied into the other "worker" threads is as minimal as possible.

For instance by using "use Tk;" instead of "require Tk;" we clearly see that lot of extra Tk stuff is copied into the new threads by looking at mem usage in task manager.

use Tk; mem usage perl.exe: 24MB/21MB (phys/virtual) require Tk; mem usage perl.exe: 12MB/9MB (phys/virtual)
(7 threads were created in this example.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580975]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2018-08-15 03:17 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (158 votes). Check out past polls.