On Thu, Sep 17, 2009 at 8:32 PM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch">ian@hixie.ch</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;">
LESSONS LEARNT<br>
<br>
If we ever define a new API that needs a lock of some kind, the way to do<br>
it is to use a callback, so that the UA can wait for the lock<br>
asynchronously, and then run the callback once it has it. (This is what<br>
the Web Database spec does, for instance.)<br></blockquote><div><br>When we add more of these features, I think we will need a way to acquire multiple locks simultaneously before running a callback. (So if we had localStorage.runTransaction(function(storage) { ... }) and
otherLockingThing.runTransaction(function(thing) { ... }), we could also
have, for example, window.runTransaction(localStorage,
otherLockingThing, function(storage, thing) { ... }).) So it may be worth thinking about what that API should be and what we will need to add to each feature spec to support it.<br><br></div></div>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>