- From: Jan-Ivar Bruaroey <jib@mozilla.com>
- Date: Mon, 08 Jun 2015 21:24:01 -0400
- To: Peter Thatcher <pthatcher@google.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Received on Tuesday, 9 June 2015 01:24:31 UTC
On 6/8/15 7:01 PM, Peter Thatcher wrote: > ... setting them individually just doesn't make sense because the time > between setting them would cause the RtpSender to be in an invalid, > broken, or awkward state. Sorry to disagree, but the "time between setting them" will /*not*/ do that. It isn't possible, because RtpSender is *not allowed* to observably progress in that time, /because JS is a single-threaded model/. Like it or not, this is why we queue a task for everything: to keep JS in the dark about anything happening in parallel to its execution. RtpSender is not above this law, and must queue a task before altering any of its properties in response to time. Therefore, from the viewpoint of JS, RtpSender *cannot *get into an invalid, broken or awkward state simply by busy-waiting for it. This: var state = RtpSender.someLiveState; while (RtpSender.someLiveState == state) {} will never complete. I showed this earlier. [1] .: Jan-Ivar :. [1] https://lists.w3.org/Archives/Public/public-webrtc/2015May/0143.html
Received on Tuesday, 9 June 2015 01:24:31 UTC