Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl Tk and Threads

by Anonymous Monk
on Aug 21, 2012 at 11:30 UTC ( [id://988700]=note: print w/replies, xml ) Need Help??


in reply to Perl Tk and Threads

Darn... I was hoping to use threads to create a splash screen while a rather complex GUI was being constructed at the start of a perl script. (It's not really the GUI that takes a long time to construct, it's the harvesting of data to populate it).

My current solution was to fork off a child process to display the splash and then send a kill 9 (KILL) to it when the main GUI was ready.

Guess I'll stick with this rather kludgy/brute force method.

Replies are listed 'Best First'.
Re^2: Perl Tk and Threads
by Anonymous Monk on Aug 21, 2012 at 15:10 UTC

    You're using threads! But they're heavy-weight threads (vs. the light-weight threads previously discussed). It might be heavy-handed, but it's not brutal. And it gets the job done!

    As wikipedia says, "a thread is a lightweight process." The flip side is that a process is a heavyweight thread. In your case, since you spawn (fork) the thread, it runs independently of the parent thread, and then exits, you probably wouldn't see much difference in performance, especially if you fork before the parent process has gotten fat.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found