A thread is a flow of control through a program with a
single execution point.Threads are one of the pieces
of a process. Every process has at least one thread
and, up until now, every process running Perl had only
one thread. With 5.005, though, one can create extra
threads. 
  In one implementation model, a program is divided
into several parts and each part is assigned to a
thread. If you are using Pipeline model, then the
dependent thread has to wait for the completion of the
task by the thread on which it is dependent.

 You can learn more about threads from
http://www.mkssoftware.com/docs/man5/perlthrtut.5.asp

Cheers !!
Dharmender Rai
 

 --- Angerstein <[EMAIL PROTECTED]> wrote: > Hi,
> a simple question:
> 
> if my program starts a thread, does it wait until
> the thread finishes or do
> it run futher?
> 
> Other harder question:
> 
> if I fill an array or other complex datastructure is
> it a pain in the neck
> to give it over to the main-prog,
> (like it is with processes...) or is it easy?
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Hanson, Rob [mailto:[EMAIL PROTECTED]]
> > Gesendet am: Dienstag, 17. September 2002 16:54
> > An: 'dan'; [EMAIL PROTECTED]
> > Betreff: RE: Timers?
> >
> > Sounds like a good job for Perl threads, a fork,
> or maybe a seperate
> > process.
> >
> > Stable threads are only available in 5.8, and
> would probably be
> > the best way
> > to go about it.
> > http://www.perl.com/pub/a/2002/09/04/threads.html
> >
> > Forking would be messy I would think.  A seperate
> process might be ok, but
> > you would probably need to use something like a
> memory sharing module or
> > database to share data between processes.
> >
> > I have little to no experience with most of that
> stuff, so I can't offer
> > anything other than these ideas.
> >
> > Rob
> >
> >
> > -----Original Message-----
> > From: dan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, September 17, 2002 9:53 AM
> > To: [EMAIL PROTECTED]
> > Subject: Timers?
> >
> >
> > I'm writing IRC services in perl (some say it's a
> bad idea, others good, I
> > personally don't care what the language is, it has
> a fast
> > response time and
> > does what I want it to do), however I need to have
> a sub to check
> > bans every
> > second, to see if it should time them out and
> remove them. I have the time
> > to expire it in unix timestamp seconds:
> > $akill{$host}->{expires}
> > I need to make a sub to run through all the %akill
> keys one by one every
> > second to check if it should time them out.
> However I need it so the timer
> > doesn't interfere with the rest of the code, i.e
> responding to
> > users on the
> > network normally as if the timer isn't even
> working.
> >
> > Any clues?
> >
> > Dan
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> > --
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to