On Fri, 21 Jun 2002, Adam Spiers wrote:

> Matthias Ferber ([EMAIL PROTECTED]) wrote:
> > Named pipes have all the same problems as message queues,
unfortunately.
> [snip]
> 
> Difficult to say without seeing the code and understanding more about
> how message queues get left behind.  Can't you do some cleanup in END?

I had to look this up, but unfortunately END doesn't handle the real
problem case, which is when the program goes kaput due to a signal, in
particular if the user hits ctrl-C.  It was a good idea though.

I've been reading about perl 5.8 and the new threading model.  I have some
hopes for that.

The part about how message queues get left behind is actually very simple
and sort of irrelevant.  The concept is exactly the same as if my script
creates a temporary file and deletes it when it's finished.  If the script
is cancelled halfway through, the temporary file doesn't get deleted, and
over time these files will eat up space.

The difference is that temporary files are so common that people have
mechanisms around for dealing with them, and the /tmp directory is a
reasonably safe place to put them.  There's no such thing for IPC
structures, which don't live in the file system.  (I also have a suspicion
that lingering IPC thingies take up more OS resources, but that's only a
guess.)  Either way, this is a tough problem for a reusable library --
unless there's some kind of convention I'm unaware of.

Sigh... hurry up, threads....

Matthias





-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Perlunit-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/perlunit-devel

Reply via email to