On Tue, Mar 28, 2006 at 10:49:36AM +0100, Malcolm Wallace wrote:
Tomasz Zielonka [EMAIL PROTECTED] wrote:
http://www.uncurry.com/repos/FakeSTM/
Perhaps it could serve as a drop-in replacement for STM in haskell
compilers which don't implement STM directly.
Nice idea. But your
Tomasz Zielonka [EMAIL PROTECTED] wrote:
It may be relevant for this discussion: I believe I reimplemented STM,
including retry and orElse, on top of old GHC's concurrency
primitives.
http://www.uncurry.com/repos/FakeSTM/
Perhaps it could serve as a drop-in replacement for STM in
Simon Marlow [EMAIL PROTECTED] wrote:
The portable interface could be Control.Concurrent.MVar, perhaps.
I don't really understand the problem, maybe I'm missing something. I
thought the idea would be that a thread-safe library would simply use
MVar instead of IORef.
I was misled by
On Tue, 2006-03-28 at 11:05 +0100, Malcolm Wallace wrote:
(snip)
* IORef is inherently thread-unsafe, and so we should eliminate IORefs
from the language.
That's not quite true, as you can have an IORef guarded by an MVar. Why
would you want such a thing? For instance, you might write a