W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2015

Re: [whatwg] Shared workers with worker parents

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 22 Jun 2015 14:01:13 -0700
Message-ID: <CAAWBYDDo9wuVoWNa_VfxVVbGXVAyJQHwPpqnuBd440-FiMei3A@mail.gmail.com>
To: James Burke <jrburke@gmail.com>
Cc: WHATWG <whatwg@lists.whatwg.org>
On Fri, Jun 19, 2015 at 3:55 PM, James Burke <jrburke@gmail.com> wrote:
> For some of the apps that run on Firefox OS, we want to use a Service
> Worker to handle a background sync message, but allow that Service
> Worker to contact a Shared Worker to do the work. This allows the
> app's open browser windows, which also can trigger a sync, to use the
> same Shared Worker to efficiently coordinate the network/database
> work.
> There are more details on the use case[1], but the main spec issue:
> currently the Shared Worker part of the spec[2] only specifies
> Documents as a parent that can keep a Shared Worker alive.
> Would it be possible to change this to also allow any type of Worker
> as a parent to a Shared Worker that can keep a Shared Worker alive?
> Is bug 28504[3] enough to track this change, or are there other things
> to line up before considering the change?
> Thanks for the insight,
> James
> [1] https://github.com/slightlyoff/ServiceWorker/issues/678
> [2] https://html.spec.whatwg.org/multipage/workers.html#dom-sharedworker
> [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=28504

How can a ServiceWorker keep a SharedWorker alive, when a
ServiceWorker does not, itself, have any lifetime guarantees?  In
fact, it's virtually guaranteed to be shut down regularly.

Received on Monday, 22 June 2015 21:01:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:33 UTC