Re: [webrtc-pc] Can onicecandidate fire before SLD.then(code)? (#2574)

> The race in question is when candidates are fired AFTER the promise is resolved but BEFORE the promise's then() code is executed.

@henbos The promise resolving and `foo` being invoked, while not synchronous, both happen on the microtask same queue, i.e. before the end of the current run of the JS event loop.

The surfacing of ice candidates happen on a queued task (i.e. main event loop).

Therefore they can't race.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2574#issuecomment-696728291 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 22 September 2020 13:39:25 UTC