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

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>wrote:

> 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