[Haskell-cafe] synchronous channels in STM

roger peppe rogpeppe at gmail.com
Thu Oct 9 06:29:40 EDT 2008


On Thu, Oct 9, 2008 at 10:12 AM, Arnar Birgisson <arnarbi at gmail.com> wrote:
> Sorry, I come into this discussion late. One-place buffers, or MVars,
> are indeed implemented over STM in the orignal paper [1].

Yes, I should have remembered that. It's ok just as long as
there's a buffer there because then there's a consistent
*memory* state that can be awaited. But using an unbuffered
channel, we need to await the state of another *process*,
so we can rendezvous with it, something that is not possible
in principle with STM.

> Is that what you seek?

It's useful, thanks, but not really what I was originally looking for.
Synchronous channels are generally easier to reason about (less states
to deal with).

On Thu, Oct 9, 2008 at 10:19 AM, Andrea Vezzosi <sanzhiyan at gmail.com> wrote:
> I'd rather say that STM is intended to be used just for building up transactions

It seems to me then that, despite the existence of the very elegant STM,
there's still room for a commonly used set of transactions outside of it,
with as many as possible within STM, along the lines of the SyncChan snippet
you posted earlier.

By the way, where does FRP (which I haven't got my head around yet)
sit with respect
to STM?

  cheers,
    rog.


More information about the Haskell-Cafe mailing list