[Haskell-cafe] STM orElse semantics

Peter Robinson thaldyron at gmail.com
Wed Mar 25 07:33:35 EDT 2009


> "Compose two alternative STM actions (GHC only). If the first action
> completes without retrying then it forms the result of the orElse.
> Otherwise, if the first action retries, then the second action is
> tried in its place. If both actions retry then the orElse as a whole
> retries."
>
> What is the definition of retrying in "If the first action completes
> without retrying then..." -- does it mean only explicitly retrying via
> the retry function, or does it include a retry caused by a write
> conflict at commit time of the first action?

I'm quite sure orElse only concerns explicit retries, it wouldn't make
much sense otherwise.

Cheers,
Peter


More information about the Haskell-Cafe mailing list