[whatwg] localStorage, the storage mutex, document.domain, and workers

On Thu, Sep 17, 2009 at 8:32 PM, Ian Hickson <ian at hixie.ch> wrote:

> LESSONS LEARNT
>
> If we ever define a new API that needs a lock of some kind, the way to do
> it is to use a callback, so that the UA can wait for the lock
> asynchronously, and then run the callback once it has it. (This is what
> the Web Database spec does, for instance.)
>

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.

Rob
-- 
"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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090918/4cf1f909/attachment.htm>

Received on Thursday, 17 September 2009 17:13:29 UTC