On 10 Sep 2008, at 20:28, Ryan Ingram wrote:
On Wed, Sep 10, 2008 at 2:55 AM, Maarten Hazewinkel
<[EMAIL PROTECTED]> wrote:
[on transaction failures in databases and STM]
This seems to be a bit too much F.U.D. for STM. As long as you avoid
unsafeIOToSTM (which you really should; that function is far more evil
than unsafePerformIO), the only failure case for current Haskell STM
is starvation; some thread will always be making progress and you do
not have to explicitly handle failure.
This is absolutely guaranteed by the semantics of STM: no effects are
visible from a retrying transaction--it just runs again from the
start. You don't have to write "proper error handling" code for
transactional updates failing.
Thanks for the clarification Ryan.
As a hobbyist I haven't actually used STM, so I was grouping it
with databases as the only transactional system I am directly familiar
with.
I suppose I could have guessed that the Haskell community would come
up with something that's a class better than a normal shared database.
Regards,
Maarten Hazewinkel
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe