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.
--
Les Mikesell
lesmikesell gmail.com
_______________________________________________
CentOS-devel mailing list
CentOS-devel centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
|