Sun Aug 16 17:48:19 PDT 2009  Thomas Schilling <nomin...@googlemail.com>
  * Make access to NameCache atomic.  Sometimes needs a lock.
  
  'readBinIface' updates the name cache in a way that is hard to use
  with atomicModifyIORef, so this patch introduces a lock for this case.
  All other updates use atomicModifyIORef.
  
  Having a single lock is quite pessimistic, so it remains to be seen
  whether this will become a problem.  In principle we only need to make
  sure that we do not load the same file concurrently (or that it's
  idempotent).  In practice we also need to ensure that concurrent reads
  do not cancel each other out (since the new NameCache may be based on
  an outdated version).

    M ./compiler/iface/BinIface.hs -4 +1
    M ./compiler/iface/IfaceEnv.lhs -32 +56
    M ./compiler/main/HscMain.lhs +3
    M ./compiler/main/HscTypes.lhs +4

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090817004819-7c5c6-cb985e1288e9e72d73fe2096f421d0448881cd36.gz

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to