[CentOS-devel] Building perl (and perl threads memory leak)...

James Olin Oden james.oden at gmail.com
Sun Mar 11 16:53:08 UTC 2007

On 3/10/07, Les Mikesell <lesmikesell at gmail.com> wrote:
> James Olin Oden wrote:
> >> Yep. Didn't someone famous once say that threads is for those who can't
> >> work out how to use select()?
> > Funny you should say that.  The original design of this daemon was to
> > use select with mulitple processes connected with pipes.  I actually
> > know how to do that but at some point as an alternative I started
> > looking at perl threads, and it looked like it would simplify things.
> > I think in the end it did somewhat, but instead of pipes you have
> > fifos to communicate between the master thread and the listener
> > threads...sounds pretty isomorphic to me.  Furthermore, I still have
> > to serialize objects going into the fifo because perl does not support
> > just sending an object through the fifo...guess what...I would have
> > had to do that with pipes and select().
> >
> Wouldn't separate processes using a shared memory segment have been
> easier all around?  I think you still have to serialize in and out
> because of perl's strange way of storing variables, though.
Ahhh, but I never quite got SysV IPC down in perl, though select was fine (-;

Actually what led me to believe that threads would be easier was that
shared data is supported.  Unfortunatey, shared objects are not.
Really shared references are not supported.

But my app works fine and is fairly maintable, provided the stinking
memory leak in the threads::shared library is gone (-:

> --
>   Les Mikesell
>    lesmikesell at gmail.com
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel at centos.org
> http://lists.centos.org/mailman/listinfo/centos-devel

More information about the CentOS-devel mailing list