W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2015

Re: Indexed DB + Promises

From: Ben Kelly <bkelly@mozilla.com>
Date: Wed, 30 Sep 2015 10:25:26 -0400
Message-ID: <CA+1UsbQax6E7191_JdXYAxZMkfC4ZY7n9VBq0btisjqgR7U24w@mail.gmail.com>
To: David Rajchenbach-Teller <dteller@mozilla.com>
Cc: Joshua Bell <jsbell@google.com>, "public-webapps@w3.org" <public-webapps@w3.org>
On Wed, Sep 30, 2015 at 3:13 AM, David Rajchenbach-Teller <
dteller@mozilla.com> wrote:

> Joshua, I am trying to understand how your proposal relates to
> microtasks. Does the extension of lifetime mean that a transaction is
> alive 1/ until the end of the event (including pending microtasks) or 2/
> that it can be kept alive across several events?

Wouldn't it have to be 2/ here?  What in the proposal prevents code from
doing this?

  tx.waitUntil(new Promise(function(resolve) {
    setTimeout(resolve, 5000);

That seems like a good thing to me, though.  It would be nice not to
require code to perform work synchronously on the main thread in order to
have a large transaction.  This tx.waitUntil() now lets code yield the main
thread for large transactions.  If I understand it correctly...

Received on Wednesday, 30 September 2015 14:25:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:57 UTC