[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Threaded??



Think of sewing, crocheting, darning, or anything else which
would use thread or yarn.  Threading basically is along the
same lines.  Each time a process is begun a new thread is
established and followed.  Sometimes to the exclusion of
other threads and sometimes in conjunction with other
threads.  Depending upon the way the program was built.  In
messages - such as newsgroups - a thread is a series of
messages which all have a common title.  Such as "a message"
and "re:a message".  Most news readers now group these
messages together under one title even though the messages
may be scattered throughout the body of that news group.
(ie: All of the "a message" entries might be located at 5,
8000, 42500, and 42505.)

In programming threads are similar to subprocesses except
they do not carry the traditional overhead of subprocesses.
(Subprocesses usually carry around all of the pre-defined
information which the parent process also carries around.)
On Unix systems this is a really big deal since, if you are
running a process which defines about 40k of environment
variables that's an additional 40k each and every time a
subprocess starts up.  Whereas with a threaded program all
you carry around in the subprocess are those variables
defined within the program itself.  On the Mac I don't think
the difference is quite as dramatic as with Unix.  But
threads do seem to start up faster than regular programs.

Maybe Chris, Paul, or Matthias could explain it better than
I - but this is good enough for me.  :-)

--------------------------------------------------------------------------------
All e-mail needs to be sent to mark@cheers.jsc.nasa.gov.  If
you don't, it will
probably bounce.  What man does not understand or fears; he
ultimately destroys.
Steve Wright: Black holes are where God divided by zero.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch