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

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

From: cowwoc <cowwoc@bbs.darktech.org>
Date: Fri, 31 May 2013 23:02:44 -0400
Message-ID: <51A96454.5080501@bbs.darktech.org>
To: public-webrtc@w3.org

     Justin, if you end up using DOM Futures this becomes a point of 
consistency :) Meaning, I don't think it would be so bad if all methods 
returned a Future.

Gili

On 31/05/2013 8:04 PM, Justin Uberti wrote:
> Was a decision reached here? It seems unfortunate to have to add 
> success/failure callbacks to several methods just to better handle 
> being called in the "closed" state.
>
>
> On Tue, May 28, 2013 at 12:06 PM, Martin Thomson 
> <martin.thomson@gmail.com <mailto:martin.thomson@gmail.com>> wrote:
>
>     On 27 May 2013 05:31, Harald Alvestrand <harald@alvestrand.no
>     <mailto:harald@alvestrand.no>> wrote:
>     > The language you're proposing sounds as if we'll violate that
>     property if
>     > the connection is closed after the call returns normally, but
>     before the
>     > task is dequeued.
>
>     Closing a closed object is an operation that can only succeed.
>
>     No checks beforehand, just enqueue the operation and if the object is
>     already closed...whee, noop.
>
>     Given that closed is a terminal state, this is indistinguishable in
>     all respects from an implementation where the callback is virtually
>     synchronous (just move the invocation of callback to after reaching
>     stable state).
>
>
Received on Saturday, 1 June 2013 03:04:06 UTC

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