[Haskell-cafe] book "Haskell Data Analysis Cookbook" by Nishant Shukla

Brandon Allbery allbery.b at gmail.com
Mon Jul 14 14:46:48 UTC 2014

On Mon, Jul 14, 2014 at 1:40 AM, Tobias Dammers <tdammers at gmail.com> wrote:

> It is not the same thing, really, unless I'm misunderstanding. AFAIK there
> is no straightforward way of making the combined check-if-exists-and-delete
> block atomic at the bearsden level, even if you force serial execution at
> the haskell level, and the established solution is to forgo the existence
> check altogether, relying on the delete call to throw when the file doesn't
> exist.
Yes; this is my point, there is no way to make the separate check atomic.
It's going to be two system calls which will allow task switching at
syscall entry and thereby allow a race against another process; no amount
of careful critical section handling within the process can stop this.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140714/2f17306b/attachment.html>

More information about the Haskell-Cafe mailing list