Skip to content
New issue

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

Exceptions within dosync!! blocks not gracefully handled #5

Open
charles-dyfis-net opened this issue Mar 8, 2013 · 0 comments
Open

Comments

@charles-dyfis-net
Copy link

Modeling Clojure's STM, a user can reasonably expect an exception thrown within a dosync!! block to abort the transaction without side-effects.

This is not in fact the case.

=> (seq @(.state (avout.transaction/get-local-transaction
                  *avout-client*)))
(0 0 0 0 0 0 0 0)

=> (avout/dosync!! *avout-client*
                   (throw (RuntimeException. "FAIL!")))
run-in-transaction exception: #<RuntimeException java.lang.RuntimeException: FAIL!>
nil

=> (seq @(.state (avout.transaction/get-local-transaction
                  *avout-client*)))
(0 0 0 0 0 0 0 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant