[whatwg] workers

Alexey Proskuryakov ap at webkit.org
Tue Sep 30 10:02:21 PDT 2008

Sep 30, 2008, в 8:46 PM, Aaron Boodman написал(а):

> close() was added so that you could forcibly kill a worker. For
> example, if you are searching a large set with many workers, you may
> want to kill them once one finds a match.
> So I think it is useful to have a conceptual difference between
> workers that are 'dedicated' and those that are 'shared'.

Hmm... So this is more about how you use the interface, not what the  
object behind it is. If one chooses to never call close() on a shared  
worker (or, say, sets myWorker.close to null right after invoking  
constructor), it becomes indistinguishable from a dedicated worker.

Hiding close() possibly sounds more like something a high-level  
framework may want to do to enforce a certain design pattern than a  
core feature.

- WBR, Alexey Proskuryakov

More information about the whatwg mailing list