Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

NodeJS Stream Meeting Notes - Async Iterators #74

Closed
@benjamingr

Description

@benjamingr

Hey,

Node discussed Symbol.asyncIterator streams in the last WG meeting yesterday (I had to miss it at the last minute :( ).

Symbol.asyncIterator can be supported inside streams without internal changes, however merging it inside core depends on what is the adopted change for Promises in core. We are happy to maintain the prototype and expand if needed. We should take care on what is the story for writing to streams, as it should match somehow the story for reading, i.e. we should be able to write with promises as well.

One issue raised was how to make async iterators work with writable streams - that is, there needs to be a way to do:

async function* foo() {
   yield 1;
   yield 2;
   yield 3;
}

And have that coerced into a NodeJS stream - I don't think it should be too problematic to do in Node and I'm excited that the streams WG is keeping a prototype for interop. Pinging @mcollina who attended the meeting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions