Skip to content

Note about underlyingSink close() method is misleading #617

@ricea

Description

@ricea

https://streams.spec.whatwg.org/#ref-for-underlying-sink-10

The stream implementation guarantees that this method will be called only after all queued-up writes have succeeded.

Except if abort() is not defined on the underlyingSink, and user code calls abort(). In that case close() can be called concurrently with write(), possibly wreaking havoc with the assumptions of the author of the underlyingSink.

I would prefer if this note included a qualification like "except when abort() is called, as mentioned below".

close() can also be called while an existing async call to close() is already in progress, but that might be a spec bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions