Skip to content

TransformStream should allow transform algorithm to function as pull source #384

Open
@wanderview

Description

@wanderview

Consider, I want to implement a pipe that latches the last value written to it. If many values are written before the next read then you just get the last value.

This currently cannot be implemented in TransformStream because the transformer function only has the option to enqueue or not enqueue any given chunk. There is no way to overwrite a previously enqueued chunk.

It would be nice if the transformer function could act like a pull source so it maintained its own "queue". In the latch case this would be a single value that gets overwritten.

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