At Wed, 5 Jun 2002 15:50:20 +1000, Gavin Carr wrote:
> On Wed, Jun 05, 2002 at 03:49:59PM +1000, Angus Lees wrote:
> > At Wed, 5 Jun 2002 14:37:28 +1000, Gavin Carr wrote:
> > > I've got a situation where I want to able to write lock some of my epl
> > > components and know that the locking will be honoured ...
> > 
> > just do the usual "write to a temporary file next to it, then rename
> > over the file you wanted" trick.  IO::AtomicFile will do it for you,
> > in fact.
> 
> Yeah that handles atomic writes, but not proper atomic updates - read
> data, modify, write, avoiding the race condition between the read and
> the write. I think that requires proper locking?

yes, i hadn't realised you wanted to read them in first..

it sounds like you want to write your own EMBPERL_INPUT_FUNC, which
does the locking and then a normal file read (see Embperl docs for an
example of "normal")

-- 
 - Gus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to