[whatwg] Application defined "locks"

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?

"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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090910/56406cc2/attachment.htm>

Received on Wednesday, 9 September 2009 19:55:11 UTC