[whatwg] workers

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

Received on Tuesday, 30 September 2008 10:02:21 UTC