On Tue, Sep 8, 2009 at 8:45 PM, Jeremy Orlow <span dir="ltr"><<a href="mailto:jorlow@chromium.org">jorlow@chromium.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div>You'd have to implement it via a mutex. An optimized implementation could wait until the first operation that can't be un-done before acquiring it, and do everything optimistically until then. This is the same situation as WebDatabase if I understand it correctly.</div>
</div>
</blockquote></div><br>AFAIK WebDatabase transactions can't have side effects outside the database, so they can be implemented optimistically with automatic retries so aborts aren't exposed to the developer.<br><br>
If localStorage transactions are made to be just syntax around a mutex then I'm not sure we've gained much for the compatibility break.<br><br>Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>