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

[whatwg] Workers and queue of events

From: Alexey Proskuryakov <ap@webkit.org>
Date: Wed, 19 Nov 2008 13:27:08 +0300
Message-ID: <8CCC4F0D-9BE2-41C7-AE55-6561B58BFFC5@webkit.org>

Nov 19, 2008, ? 12:55 PM, Robert O'Callahan ???????(?):

> And if it becomes a problem we might in a future version be able to  
> add something like a 'messagepostfailed' event that is fired on the  
> sending port in case a message failed to reach its target for one  
> reason or another.
> I don't think that would be useful. What if the message reaches the  
> target but the target dies while the message is queued? Or it dies  
> after executing the first JS statement in the message handler?

It turns out that message confirmations are necessary for garbage  
collection anyway - one can't GC a worker object if its thread/process  
has pending messages, or running scripts, because they can talk back  
and post events to worker.onmessage. So, we send a confirmation after  
the message has been dispatched, not just queued in the receiver. This  
is functionally equivalent to what Gecko does, I believe.

Note however that I'm talking about worker objects here, not ports.

- WBR, Alexey Proskuryakov
Received on Wednesday, 19 November 2008 02:27:08 UTC

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