[whatwg] Application defined "locks"

Robert O'Callahan robert at ocallahan.org
Wed Sep 9 19:55:11 PDT 2009


On Thu, Sep 10, 2009 at 2:38 PM, Michael Nordman <michaeln at google.com>wrote:

> If this feature existed, we likely would have used it for offline Gmail to
> coordinate which instance of the app (page with gmail in it) should be
> responsible for sync'ing the local database with the mail service. In the
> absence of a feature like this, instead we used the local database itself to
> register which page was the 'syncagent'. This involved periodically updating
> the db by the syncagent, and periodic polling by the would be syncagents
> waiting to possibly take over. Much ugliness.
> var isSyncAgent = false;
> window.acquireFlag("syncAgency", function() { isSyncAgent = true; });
>
> Much nicer.
>

How do you deal with the user closing the syncagent while other app
instances remain open?

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/20090910/56406cc2/attachment-0002.htm>


More information about the whatwg mailing list