[whatwg] Combining the DedicatedWorker and SharedWorker interfaces

Ian Hickson ian at hixie.ch
Wed Nov 5 14:59:32 PST 2008


On Wed, 5 Nov 2008, Aaron Boodman wrote:
> 
> In light of both of these, I have a new proposal for how to 
> simplify/combine these two interfaces. Here are the deltas from the 
> current spec:
> 
> * Remove startConversation() from the Worker interface

And from MessagePort, presumably?


> * Remove the port property from the SharedWorker interface and give it
> a postMessage and onmessage just like dedicated workers have.

I really don't like this. With (Dedicated)Worker it makes sense because 
both sides bury the underlying message channel and ports and so things 
like closing the port, or whether the port is active, are hidden on both 
sides. But with SharedWorker, if we only bury it on one side, there is a 
lack of symmetry that IMHO is going to lead to all kinds of issues and 
confusion. I really don't like that. If people start sending one side's 
pipe down another channel, we can end up with a situation where a 
SharedWorker object really represents a port that has nothing to do with 
the worker anymore.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list