by imtringued · 9y ago · 0 comments
https://hackage.haskell.org/package/base-4.10.0.0/docs/Contr...
>An MVar t is mutable location that is either empty or contains a value of type t.
>They can be used in multiple different ways:
>1. As synchronized mutable variables,
Compare with C++ where every smartpointer holds mutable state (even if it points to a immutable value) and triggers a memory barrier whenever it is accessed.