[whatwg] workers

2008/9/30 Alexey Proskuryakov <ap at webkit.org>:
> Not really - it seems to me that they could work for shared workers as well,
> but I need to think about it more. Creating/accessing a shared worker could
> also create a default port that for use with Worker::postMessage, while all
> messages from such would be forwarded to WorkerGlobalScope::onmessage
> perhaps? Closing such a port wouldn't kill the worker thread, of course.

I initially thought this too, but changed my mind.

SharedWorkers are by definition meant to be used from multiple pages,
so a developer will usually not use the default port since it would
only work for the first client and not any other. If the developer
only intended for their to be one client, he would just use
DedicatedWorker.

- a

Received on Tuesday, 30 September 2008 11:44:05 UTC