W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2013

Re: Operations in invalid states: Exceptions don't make sense.

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Thu, 20 Jun 2013 10:50:30 +0200
Message-ID: <51C2C256.2000000@ericsson.com>
To: Jan-Ivar Bruaroey <jib@mozilla.com>
CC: public-webrtc@w3.org
On 2013-06-19 18:28, Jan-Ivar Bruaroey wrote:
> On 6/19/13 2:47 AM, Adam Bergkvist wrote:
>> With a processing state, the second call would always fail.
>
> Agreed.
>
>> That's deterministic and observable from JS (compared to a queue in
>> the background).
>
> The current approach is also deterministic, as I showed.
> The current approach is also observable from JS because the failure
> callback is called. In fact with Futures/Promises, there's little
> difference.

With Future/Promises you practically build the operations queue in your 
application; that's rather nice and what I think is desirable.

/Adam
Received on Thursday, 20 June 2013 08:50:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:33 UTC