[Israel.pm] Multi Threading exercises ideas

Shlomi Fish shlomif at iglu.org.il
Wed Aug 23 07:01:45 PDT 2006


On Wednesday 23 August 2006 12:50, Yossi.Itzkovich at ecitele.com wrote:
> Shlomi,
> Thanks for your answer. About Perl threads: so as I understand from you
> Perl is not a good place to start writing MT applications with.  correct ?
>

I didn't say that. What I tried with perl5005threads worked pretty nicely. 
See:

http://ip-noise.berlios.de/

ithreads are much more problematic, but I don't know if perl5005threads are 
still recommended by the perl5-porters.

Regards,

	Shlomi Fish

> Yossi
>
> Shlomi Fish <shlomif at iglu.org.il> wrote on 23/08/2006 12:15:23:
> > On Wednesday 23 August 2006 08:25, Yossi.Itzkovich at ecitele.com wrote:
> > > Hi,
> > >
> > > I have never written a MT code (not in Perl nor in any other language I
> > > work with), and I would like to start exercise.
> > >
> > > Can you give me ideas (or links to ideas) for smalll MT application to
> > > write  ?  I want to write small application to "feel" the MT issue
> > > (==problems, deadlocks etc.)
> >
> > One good problem is a First-Come First-Served Readers/Writers Lock:
> >
> > http://www.shlomifish.org/rwlock/
> >
> > Others I can think of are servers (such as web-servers) powered by thread
> >
> > pools. You might also wish to look at:
> >
> > http://fc-solve.berlios.de/to-do.html#multi_threading
> >
> > But there are plenty of other problems.
> >
> > > BTW: Any known problems with MT in perl >=5.8.4 ?
> >
> > Well, there are two alternative thread systems in perl5:
> >
> > 1. perl5005threads.
> > 2. ithreads
> >
> > perl5005threads is hod you'd normally expect thread to behave. ithreads
>
> are
>
> > threads that are not quite lightweight because they keep copies of all
> > non-shared variables. And even in the variables that are declared shared,
> >
> > there are many problems. (Last time I checked splice() was not supported
>
> on
>
> > shared arrays.)
> >
> > However, perl5005threads caused a lot of implementation problems for some
> >
> > reason.
> >
> > Regards,
> >
> >    Shlomi Fish
> >
> > ---------------------------------------------------------------------
> > Shlomi Fish      shlomif at iglu.org.il
> > Homepage:        http://www.shlomifish.org/
> >
> > Chuck Norris wrote a complete Perl 6 implementation in a day but then
> > destroyed all evidence with his bare hands, so no one will know his
>
> secrets.

-- 

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

Chuck Norris wrote a complete Perl 6 implementation in a day but then
destroyed all evidence with his bare hands, so no one will know his secrets.



More information about the Perl mailing list