W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: Move sync APIs out of "Worker" into "SyncWorker"

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 29 Jul 2014 11:40:32 -0700
Message-ID: <CA+c2ei-O_fT3vrWSRB5r9pasGr8dqiqw_y=dWMUuy6XS63pC+w@mail.gmail.com>
To: Jake Archibald <jaffathecake@gmail.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, public-script-coord <public-script-coord@w3.org>, Alex Russell <slightlyoff@google.com>, Ian Hickson <ian@hixie.ch>
importScripts is indeed a good question. Ideally we wouldn't make an
exception and instead rely on ES6 module's "import" syntax. But it's
too soon to rely on of course.

So yeah, I think we make an exception for importScripts for now.
Possibly we only allow importScripts during the initial eval of the

/ Jonas

On Tue, Jul 29, 2014 at 11:19 AM, Jake Archibald <jaffathecake@gmail.com> wrote:
> I'll try and chase down those in Blink land that want sync stuff in
> SharedWorkers and find out why. If it's just "sync is easier", bleh, that's
> what ES7 async functions are for.
> As an aside, do we make an exception with importScripts? ServiceWorker has
> importScripts but with restrictions & caching built in, but it'll implicitly
> cache the scripts & fail if it's called after the initial execution. Maybe
> SharedWorker should have the same behaviour but without the caching.
> On 29 July 2014 19:01, Jonas Sicking <jonas@sicking.cc> wrote:
>> On Tue, Jul 29, 2014 at 8:50 AM, Anne van Kesteren <annevk@annevk.nl>
>> wrote:
>> > On Tue, Jul 29, 2014 at 5:30 PM, Jake Archibald <jaffathecake@gmail.com>
>> > wrote:
>> >> Would it makes sense to do one of the following?:
>> >>
>> >> * Expose the sync methods on DedicatedWorker only - this would require
>> >> usage
>> >> stats of sync methods in SharedWorkers to be insignificant
>> >> * Expose the sync methods on a new global SyncWorker, where
>> >> DedicatedWorkerGlobalScope would be
>> >> [Global=Worker,SyncWorker,DedicatedWorker], SharedWorkerGlobalScope
>> >> would be
>> >> [Global=Worker,SyncWorker,SharedWorker]
>> >
>> > I like the first option if we can make it fly. Jonas probably has
>> > concerns. Ian will need to update HTML for the second option to work.
>> Mozilla would be fine with the first option. I even emailed this list
>> about this before we started shipping SharedWorker. However Blink (who
>> at the time had the only implementation of SharedWorker) showed no
>> interest in removing sync APIs from SharedWorker and so we ended up
>> shipping sync APIs in shared workers.
>> If Google+Opera shows interest in removing sync APIs from SharedWorker
>> in Blink, in the form of actual patches, then I believe that Mozilla
>> would follow.
>> / Jonas
Received on Tuesday, 29 July 2014 18:41:30 UTC

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