Make FastString thread-safe.
authorThomas Schilling <nominolo@googlemail.com>
Mon, 24 Aug 2009 18:22:52 +0000 (18:22 +0000)
committerThomas Schilling <nominolo@googlemail.com>
Mon, 24 Aug 2009 18:22:52 +0000 (18:22 +0000)
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.


No differences found