From: Alain Frisch <alain.frisch@inria.fr>
To: Gabriel Kerneis <gabriel.kerneis@enst.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [OT?] spamoracle concurrency
Date: Fri, 13 Apr 2007 09:57:44 +0200 [thread overview]
Message-ID: <461F37F8.5030509@inria.fr> (raw)
In-Reply-To: <20070413085621.7fbb74b3@kerneis.info>
Gabriel Kerneis wrote:
> What about the following scenario :
> 1) "spamoracle add" reads the database, updates it and writes it to a
> fresh file
> 2) "spamoracle read" begins to read the database from file
> 3) "spamoracle add" renames the file
> 4) "spamoracle read" finishes to read the database from file and closes
> the file (which no longer exists ?)
>
> Is it safe ?
Yes, it is. In step 4, "spamoracle read" sees the old version of the
file through the already opened file descriptor.
-- Alain
next prev parent reply other threads:[~2007-04-13 7:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 6:06 Ian Zimmerman
2007-04-13 6:39 ` [Caml-list] " Alain Frisch
2007-04-13 6:56 ` Gabriel Kerneis
2007-04-13 7:57 ` Alain Frisch [this message]
2007-04-13 6:47 ` Gabriel Kerneis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=461F37F8.5030509@inria.fr \
--to=alain.frisch@inria.fr \
--cc=caml-list@yquem.inria.fr \
--cc=gabriel.kerneis@enst.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox