[commit: ghc] master: Attempt to make lazy ST thread safe (2f5cb3d)
git at git.haskell.org
git at git.haskell.org
Fri Feb 3 22:26:17 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2f5cb3d44d05e581b75a47fec222577dfa7a533e/ghc
>---------------------------------------------------------------
commit 2f5cb3d44d05e581b75a47fec222577dfa7a533e
Author: David Feuer <david.feuer at gmail.com>
Date: Fri Feb 3 17:24:17 2017 -0500
Attempt to make lazy ST thread safe
Use `noDuplicate#` to prevent lazy `ST` thunks from
being evaluated in multiple GHC threads.
Some lazy `ST` functions added laziness that did not seem to be useful
(e.g.,
creating lazy pairs that will never be matched unless one of their
components
is demanded). Stripped that out.
Reviewers: ekmett, simonpj, bgamari, simonmar, austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3038
GHC Trac Issues: #11760
>---------------------------------------------------------------
2f5cb3d44d05e581b75a47fec222577dfa7a533e
libraries/base/Control/Monad/ST/Lazy/Imp.hs | 142 +++++++++++++++++----
libraries/base/tests/T11760.hs | 51 ++++++++
.../tests/{IO/IOError002.stdout => T11760.stdout} | 0
libraries/base/tests/all.T | 2 +
libraries/base/tests/fixUsingLazyST.stdout | 2 +
libraries/base/tests/lazySTexamples.hs | 110 ++++++++++++++++
libraries/base/tests/lazySTexamples.stderr | 16 +++
libraries/base/tests/lazySTexamples.stdout | 6 +
8 files changed, 305 insertions(+), 24 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 2f5cb3d44d05e581b75a47fec222577dfa7a533e
More information about the ghc-commits
mailing list