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

[whatwg] Combining the DedicatedWorker and SharedWorker interfaces

From: Alexey Proskuryakov <ap@webkit.org>
Date: Thu, 6 Nov 2008 08:53:52 +0300
Message-ID: <AD719EFA-2C8C-42C3-8CE9-226E3F7C4F3B@webkit.org>

Nov 6, 2008, ? 2:18 AM, Jonas Sicking ???????(?):

>> Similarly, having separate interfaces for Worker and SharedWorker  
>> implies that there is some fundamental difference in their behavior  
>> - a difference that eludes me so far.
> A shared worker is shared between all scripts on a single site[*]  
> that instantiates a worker with the same name. I.e. where the second  
> argument to the constructor is the same. (Don't remember what  
> happens if the second argument is the same as an existing worker,  
> but the first is not, check with the spec).

Sure, that part is clear - but it's only about the behavior of the  
object's constructor, not the object itself! It alone doesn't warrant  
having a separate interface.

As an example from another area, see mmap(2) function - you can pass  
MAP_ANON or MAP_FILE via its flags to achieve similar results. Note  
also that it has a number of other options. If we create a separate  
interface for every Worker isolation level needed (both inside and  
outside), we'll soon end up with PrivateWorker, SharedDataWorker and  
who knows what else.

- WBR, Alexey Proskuryakov
Received on Wednesday, 5 November 2008 21:53:52 UTC

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