We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is kind of embarrassingly bad:
test :: MonadConc m => m Int test = do v <- atomically (newTVar 1) fork . atomically $ do writeTVar v 2 writeTVar v 3 retry atomically (readTVar v)
Because the writing transaction is unconditionally aborted, this is equivalent to:
test :: MonadConc m => m Int test = do v <- atomically (newTVar 1) fork (atomically retry) atomically (readTVar v)
But dejafu thinks it's nondeterministic:
> runST $ resultsSet defaultWay defaultMemType test fromList [Right 1,Right 2]
The problem is here, in the implementation of rolling back transactions:
dejafu/dejafu/Test/DejaFu/STM/Internal.hs
Line 154 in 05a8f4a
The >> should have its arguments flipped. Currently the undo action is computed as writeTVar v 1 >> writeTVar v 2, which is clearly wrong.
>>
writeTVar v 1 >> writeTVar v 2
The text was updated successfully, but these errors were encountered:
Add a test case for #111
1da3143
008b812
Merge pull request #114 from symbiont-io/master
060939d
fix #111
No branches or pull requests
This is kind of embarrassingly bad:
Because the writing transaction is unconditionally aborted, this is equivalent to:
But dejafu thinks it's nondeterministic:
The problem is here, in the implementation of rolling back transactions:
dejafu/dejafu/Test/DejaFu/STM/Internal.hs
Line 154 in 05a8f4a
The
>>
should have its arguments flipped. Currently the undo action is computed aswriteTVar v 1 >> writeTVar v 2
, which is clearly wrong.The text was updated successfully, but these errors were encountered: