Browse thread
[OT?] spamoracle concurrency
-
Ian Zimmerman
-
Alain Frisch
-
Gabriel Kerneis
- Alain Frisch
-
Gabriel Kerneis
- Gabriel Kerneis
-
Alain Frisch
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-04-13 (07:57) |
From: | Alain Frisch <alain.frisch@i...> |
Subject: | Re: [Caml-list] [OT?] spamoracle concurrency |
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