monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] pidfile cleanup


From: Nathaniel Smith
Subject: Re: [Monotone-devel] pidfile cleanup
Date: Thu, 24 Aug 2006 20:34:35 -0700
User-agent: Mutt/1.5.12-2006-07-14

On Thu, Aug 24, 2006 at 10:07:00PM -0500, Matthew Nicholson wrote:
> I like the idea of converting the signal handler into an exception in 
> some safe manner.  I am aware that you can't just throw an exception, 
> and there is no straight forward way to do it that will work in every 
> case, but that is the cleanest way I can think of to deal with it.
>
> My favorite method is to have some sort of flag that gets checked in 
> various places.  If the flag is set then an exception is thrown.  This 
> adds some overhead of course (but not much).

This is basically the approach that we considered, and then gave up
on, a month or two ago when this came up :-).  There are mailing list
or IRC logs of the discussion, but the main issue with the "check a
flag" approach is that it's basically impossible to make sure that one
is checking it often enough.  Maybe you are, maybe you aren't, you
basically have to audit each and every loop in the code... and you can
never be really sure you've caught them all.  It's not an approach
that leads to consistently reliable software.

-- Nathaniel

-- 
In mathematics, it's not enough to read the words
you have to hear the music




reply via email to

[Prev in Thread] Current Thread [Next in Thread]