Re: [webrtc-pc] Setting local/remote descriptions in succession without waiting for the promises to resolve

I think you may be missing the fact that `createOffer`, `createAnswer`, `setLocalDescription` and `setRemoteDescription` all use an ["operations queue"](https://www.w3.org/TR/webrtc/#dfn-operations-queue) that forces the algorithms to be executed serially. "Enqueue an operation" means "use operations queue" whereas "queue a task" doesn't.

With that in mind, is this race still possible? I don't think so. After PR #1519 is merged, the "track" event is guaranteed to fire before the first SRD promise resolves. And the second SRD is guaranteed to only start after the first SRD promise resolves.

Note that there's still this issue, which is that some things happen "in parallel" that aren't allowed to: https://github.com/w3c/webrtc-pc/issues/1177

-- 
GitHub Notification of comment by taylor-b
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1569#issuecomment-327285931 using your GitHub account

Received on Tuesday, 5 September 2017 19:58:31 UTC