W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2008

[whatwg] workers

From: Aaron Boodman <aa@google.com>
Date: Tue, 30 Sep 2008 08:19:22 -0700
Message-ID: <278fd46c0809300819y2dceaed9s39b7ea0efcdb07e5@mail.gmail.com>
2008/9/30 Alexey Proskuryakov <ap at webkit.org>:
> Sep 24, 2008, ? 10:38 PM, Aaron Boodman ???????(?):
>> interface DedicatedWorker : Worker {
> I've been trying to understand the difference between SharedWorker and
> DedicatedWorker interfaces. Besides the ability to pick an existing worker
> by name, are there any other semantic differences? I may be missing
> something, but it looks like a single Worker interface with an optional name
> parameter to constructor would work just as well.

That is what we are debating here. Logically, there is a concept of a
"shared worker", which can be referenced from multiple pages in the
same origin. There is a debate about how much the interface between
shared workers and dedicated workers should be different.

I'm of the opinion that there should be as little difference as
possible, to lower the amount of API to learn. Therefore in my
preferred proposal, the only difference between SharedWorker and
DedicatedWorker is that the latter has a close() method. It doesn't
make sense to allow one user of a SharedWorker to close something
others are depending on.

Jonas is in favor of making a particular use case of DedicatedWorker
as simple to use as possible. This requires extra API on
DedicatedWorker that doesn't make sense for SharedWorker.

>> void sendMessage(String message);
> The WHATWG draft calls this postMessage() - is this just a different name,
> or an implied substantial difference in behavior?

No that was a mistake on my part. It should be called postMessage.

- a
Received on Tuesday, 30 September 2008 08:19:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:05 UTC