Re: forks.pm vs. ithreads?

[email protected] (Elizabeth Mattijsen)
Newsgroups perl.ithreads
Message-ID <p05111b03baa363c75fed@[192.168.1.9]>
Sorry for the late response, some real world stuff came inbetween...

At 11:39 -0500 3/21/03, Chen, Allen wrote:
>Anyway, I'm very interested in Elizabeth's forks.pm module.  I'm wondering
>how it compares to ithreads.  I see that forks is much better with memory,
>but how about performance?  Besides memory usage, is there any reason to use
>one over the other?

Reduced memory usage was _the_ reason for me to develop forks.pm as a 
proof of concept.  But this is at the expense of performance, as all 
communication between threads (storing and fetching variables) is 
done using sockets.  Although this is done on an open connection, 
this is still a significant overhead.

Other reasons for me to develop forks were:
- technically being able to run this with pre-5.8.0 perls so that 
people would not have to migrate to 5.8.X before being able to try 
Perl threads (so you could think of forks.pm as a tutorial module).
- possible expansion to running on different physical machines 
without having to abandon the API.


>And one last question: will Thread::Queue and Thread::Semaphore work with
>forks.pm?

As both are just applications of shared variables, they should work, yes.


Liz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.