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

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