[Haskell-cafe] book "Haskell Data Analysis Cookbook" by Nishant Shukla
Vasili I. Galchin
vigalchin at gmail.com
Sat Jul 12 23:54:28 UTC 2014
I believe there is a non-thread safe code fragment in Chapter 1(page 15):
import System.Directory (doesFileExist)
.....
exist <- doesFileExist filename
-- these two lines are non-thread safe .. yes?? to be thread-safe
the above line and the following line would have to be together
atomic ....
input <- if exists then readFile filename else return ""
...........
Vasili
More information about the Haskell-Cafe
mailing list