#2808: createDirectoryIfMissing should be atomic
------------------------------------+---------------------------------------
    Reporter:  EricKow              |        Owner:  igloo           
        Type:  merge                |       Status:  reopened        
    Priority:  normal               |    Milestone:  6.10.2          
   Component:  libraries/directory  |      Version:  6.10.1          
    Severity:  normal               |   Resolution:                  
    Keywords:                       |   Difficulty:  Unknown         
    Testcase:                       |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple     |  
------------------------------------+---------------------------------------
Comment (by simonmar):

 Dropping some notes here so I don't forget over the holidays:

  * This new version fails `createDirectory001`, because the dir gets
 removed
    between `createDirectory` and `doesDirectoryExist`, resulting in a
    isAlreadyExists exception being thrown.  We could do better here by
    calling `System.Posix.getFileStatus` if available.  (ToDo: what about
 Windows?)

  * the test should check for two threads both doing
    `createDirectoryIfExists; cleanup` too.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2808#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to