Re: [webrtc-pc] Racy setParameters()/getParameters() behavior (#2315)

> Queueing the clearing of LastReturnedParameters will have the effect of only allowing setParameters within the same execution unit or execution units that were already queued prior to calling getParameters, right?

Right.

> We invented transactionId because this was felt to be too restrictive, I think. We could change that.

Expecting retrieved parameters to remain valid over async periods of time leads to intermittent problems. Any use case that needs this permissiveness, would be inherently racy, so I hope it doesn't exist. ;)

> transactionId still matters because the sequence
>
> a = getParameters()
> await something
> b = getParameters()
> setParameters(a)
> 
> needs to fail.

It will. We're not removing `transactionId`. See [slides](https://docs.google.com/presentation/d/1QEdMf6Ixg1NNvHoZUvO29njrSKn9pdF1WqcrFWI4uX8/edit?ts=5dbaf0b6#slide=id.g6b7f95ec98_5_33).

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

Received on Monday, 25 November 2019 15:56:43 UTC