IORefCAS: Atomic compare and swap for IORefs and STRefs.
After GHC 7.2 a new
casMutVar# primop became available, but was
not yet exposed in Data.IORef. This package fills that gap until
such a time as Data.IORef obsoletes it.
Further, in addition to exposing native Haskell CAS operations, this
package contains "mockups" that imititate the same functionality
using either atomicModifyIORef and unsafe pointer equality (in
Data.CAS.Fake) or using foreign functions (
These alternatives are useful for debugging.
Note that the foreign option does not operate on IORefs and so is
directly interchangeable with
Data.CAS.Fake only if
the interface in
Data.CAS.Class is used.
[Skip to Readme]
|Versions [faq]||0.0.1, 0.0.1.1, 0.0.1.2, 0.1.0.1, 0.2, 0.2.0.1|
|Dependencies||base (>=188.8.131.52 && <4.7), bits-atomic, ghc-prim [details]|
|Author||Adam C. Foltzer, Ryan Newton|
|Revised||Revision 1 made by HerbertValerioRiedel at Sun Sep 30 15:28:52 UTC 2018|
|Uploaded||by RyanNewton at Fri Dec 23 15:38:24 UTC 2011|
|Downloads||3826 total (112 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
Docs uploaded by user
Build status unknown [no reports yet]
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees