W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > September 2017

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

From: Taylor Brandstetter via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Sep 2017 19:58:20 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-327285931-1504641491-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:42 UTC