Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Threading vs perl

by spurperl (Priest)
on Jun 20, 2005 at 13:12 UTC ( [id://468324]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Threading vs perl
in thread Threading vs perl

Perl can do asynchronous IO, but it still needs threads. Nothing to claim the opposite "by my logic".

Asynchronous IO is great, but in some applications it's not enough, and threads are better. This becomes especially useful in applications with GUIs. You can use Tk's "after" utility to simulate multitasking, but it ain't pretty. Using threads is much, much better, and far more comfortable.

Threads make it very easy and quick to share data between units of execution, unlike processes. When you have a manager-workers model that requires a lot of data to be passed around quickly, threads come in very useful.

Continuations won't come instead of threads. While they make "cooperative execution" possible, it's not what they really are for, as far as I understand. You still have to decide when to give up control, and with many paths of execution it's important that this is done quickly and efficiently.

Replies are listed 'Best First'.
Re^4: Threading vs perl
by Eyck (Priest) on Jun 20, 2005 at 13:42 UTC

    It seems like people are taught GUI programming with threads and thats the reason for this this strange popularity among younger monks.

    What is really fun is this, statements like "but it still needs threads." are really pleasing to some monks, while "why actually?" make them angry.

    I can't really understand this,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-25 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found