[Ur] Generalizing transactions
Marc Weber
marco-oweber at gmx.de
Wed Dec 1 10:42:37 EST 2010
Excerpts from Adam Chlipala's message of Wed Dec 01 16:14:56 +0100 2010:
> This could have a big impact on memory usage. You'd essentially need a
> separate heap for each failed execution whose pointers you want to keep
> valid.
How often do you retry? How often do you expect retries?
Complexity would be about adding a linked list. So it would be bearable
:)
I'm fine with your judgement though.
You should also add the info to uw_{set,get}_global
Maybe consider making a difference between "request" and run and define
it.
What about uw_push_cleanup and uw_pop_cleanup()
uw_pop_cleanup runs the handler. So it looks like the handler should be
run always. However you don't say what happens when you don't pop and
there is no error. Is the hnadler run then ? Thus are all cleanup
functinos run always?
It looks like a bug to me not popping handlers yourself. It can't hurt
saying so if that's the case. Eg adding "You should always pop the
cleanup function if there is no error yourself" would suffice.
Marc Weber
More information about the Ur
mailing list