stm monad problem
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-06-13T10:28:15Z
Indexed on
2010/06/13
10:32 UTC
Read the original article
Hit count: 175
haskell
This is just a hypothetical scenario to illustrate my question. Suppose that there are two threads and one TVar shared between them. In one thread there is an atomically block that reads the TVar and takes 10s to complete. In another thread is an atomically block that modifies the TVar every second. Will the first atomically block ever complete? Surely it will just keep going back to the beginning, because the log is in an inconsistent state?
© Stack Overflow or respective owner