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

[whatwg] Sending MessagePorts after they have started

From: Alexey Proskuryakov <ap@webkit.org>
Date: Fri, 14 Nov 2008 23:38:56 +0300
Message-ID: <10ABD3B5-0167-41C6-BDDC-29C342D729CF@webkit.org>

Nov 14, 2008, ? 11:31 PM, Jonas Sicking ???????(?):

>> Could you please explain how this scenario is affected by the port  
>> being started? Messages are queued in closed ports until those are  
>> started, so I think that it applies word to word to closed ports.
>
> Where the messages are queued are an implementation detail. So you  
> can queue messages in the outgoing port until you get word from the  
> receiving port that it has been opened. At that point you know where  
> the receiving port lives and will always live for the rest of its  
> life and can send all messages directly there.


That's an interesting idea! But this means that such ports have to  
remain entangled (in an invisible manner) even after being explicitly  
told to close. E.g., if portA sends messages, then is closed, and only  
after that, portB is started. If messages are to be queued at portA,  
they will need to be sent at this point - tricky!

I agree that the communication problem is much simpler than GC though  
- it's just that trying to fix it makes GC even more complicated  
because of the need to track forwarding objects, "hidden entangled"  
state etc.

Nov 14, 2008, ? 11:32 PM, Jonas Sicking ???????(?):

> Actually, come to think of it, what is the BaseURI for workers? I.e.  
> what URI is importScripts and XHR resolved against?

"The base URL of a URL passed to an API in a worker is the absolute  
URL given that the worker's location attribute represents. Both the  
origin and effective script origin of scripts running in workers are  
the origin of the absolute URL given that the worker's  
locationattribute represents."

- WBR, Alexey Proskuryakov
Received on Friday, 14 November 2008 12:38:56 UTC

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