[Haskell-cafe] What does unpacking an MVar really mean?
leon.p.smith at gmail.com
Tue Jul 31 19:18:57 CEST 2012
On Tue, Jul 31, 2012 at 7:37 AM, Bertram Felgenhauer <
bertram.felgenhauer at googlemail.com> wrote:
> Note that MVar# itself cannot be unpacked -- the StgMVar record will
> always be a separate heap object.
One could imagine a couple of techniques to unpack the MVar# itself, and
was curious if GHC might employ one of them.
So, really, unpacking the MVar does not eliminate a layer of indirection,
it just eliminates the need to check a pointer tag (and possibly execute a
thunk or follow some redirects if you don't have a pointer to an MVar#).
I think this is what I was ultimately after.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe