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

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

From: Justin Uberti <juberti@google.com>
Date: Fri, 31 May 2013 20:04:03 -0400
Message-ID: <CAOJ7v-24aKqGxyNB-hdQHZRyF1a3KGLO0yPcLnUtfwta1TfSnA@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Harald Alvestrand <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
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

> On 27 May 2013 05:31, Harald Alvestrand <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 00:04:55 UTC

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