- From: Anant Narayanan <anant@mozilla.com>
- Date: Fri, 15 Jul 2011 16:05:00 -0700
- To: public-webrtc@w3.org
On 7/15/11 2:59 PM, Ralph Giles wrote: > After further discussion it seems the situation is a bit more > complicated. The event loop, as described in Ian's reference[1] does > make this safe, by positing multiple task queues which can be > prioritized separately. > > However, we don't currently implement this in gecko. We have a number > of hacks to make some sorts of nested event loops work better, but I'm > not longer clear that this race would be absolutely prevented until > the htm5 event-loop implementation is complete. I would very much like for explicit connect() and listen() methods even if we do end up implementing nested event loops in Gecko. In my opinion, code just reads cleaner when you say: var conn = new PeerConection(...); conn.onRemoteStreamAdded = function(stream) { console.log("stream was added"); }; conn.connect(); instead of omitting the connect() and hoping that your onRemoteStreamAdded callback will be called magically. It also makes clear the distinction between streams that were added before the RTP negotiation happened, and those that were added after and sets expectations accordingly. -Anant
Received on Friday, 15 July 2011 23:05:37 UTC