From: Thomas Schilling Date: Mon, 24 Aug 2009 18:22:52 +0000 (+0000) Subject: Make FastString thread-safe. X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=738f70785e381ca2f43413a1d8efa4d5929b8231;hp=738f70785e381ca2f43413a1d8efa4d5929b8231;p=ghc-hetmet.git Make FastString thread-safe. This is needed both for per-session parallelism and for allowing multiple concurrent sessions in the same process. With the help of atomicModifyIORef and unsafePerformIO it is also quite fast--an MVar would most likely be slower. On a full compilation of Cabal's head branch it was about 1-2 percent slower, but then overall compilation times varied by about 4 percent, so I think it's worth it. ---