summaryrefslogtreecommitdiff
path: root/compiler/utils/Util.lhs
diff options
context:
space:
mode:
authorThomas Schilling <nominolo@googlemail.com>2009-08-17 00:48:19 +0000
committerThomas Schilling <nominolo@googlemail.com>2009-08-17 00:48:19 +0000
commit9f68c34843602e815e71ef68f43adc01da993672 (patch)
treeb1d54a85d4086b0ff7d48bc6e73be8e5792e15e1 /compiler/utils/Util.lhs
parentf391c6e6b04055eac8bc878af31042e103387530 (diff)
downloadhaskell-9f68c34843602e815e71ef68f43adc01da993672.tar.gz
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).
Diffstat (limited to 'compiler/utils/Util.lhs')
0 files changed, 0 insertions, 0 deletions