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

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

From: Martin Thomson <martin.thomson@gmail.com>
Date: Tue, 28 May 2013 09:06:49 -0700
Message-ID: <CABkgnnU68MnzATfrgmsqWyb92E2iT0_4iXzYuAuhUzW5P_+evw@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
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 Tuesday, 28 May 2013 16:07:21 UTC

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