ap at webkit.org
Tue Sep 30 09:10:27 PDT 2008
Sep 30, 2008, в 7:19 PM, Aaron Boodman написал(а):
> 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.
I'm not sure it's so good in the case of dedicated workers either, as
they can be used from other contexts via additional message ports. The
close() method could just close the default port.
Both shared and dedicated workers have to maintain a strong reference
to a context that created them, just to have a context to execute
event listeners in. So, they are basically the same as far as
implementation is concerned AFAICT.
- WBR, Alexey Proskuryakov
More information about the whatwg