Re: Sync API for workers

On Mon, 3 Sep 2012, Glenn Maynard wrote:
> 
> - Add an internal flag to MessagePort, "blocking permitted", which is
> initially set.
> - When a MessagePort "port" is transferred from source to dest,
>     - If source is an ancestor of dest, the "blocking permitted" flag of
> "port" is cleared.  (This is a "down" transfer.)

You basically can't do this, because by the time you've received the 
message saying that the port is in a permitted scope, the other side of 
the port could have been shunted three times and now be who knows where.

Basically as soon as a port leaves the scope in which it was created, you 
can no longer make any stable statements about where the other side is. 
This is why the ports used in dedicated Workers are hidden (so you can't 
send them anywhere).

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

Received on Tuesday, 4 September 2012 20:11:26 UTC