Hanns Holger Rutz
unread,Mar 15, 2014, 7:01:02 AM3/15/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scala-stm-e...@googlegroups.com
Hi there,
I have a suspicion that some code of mine performs side effects which
shouldn't happen within a Txn. Therefore, I want to deliberately run a
Txn multiple times retried. Like this:
var retries = 3
atomic { implicit tx =>
doSomething()
if (retries > 0) {
retries -= 1
Txn.retry
}
}
But this hangs because `Txn.retry` waits until "some memory location
observed by this transaction has been changed".
What would be the best way to issue the retry explicitly? How would I
cause Txn.retry to unhang?
Thanks, .h.h.