Skip to content

Can pipeTo() be synchronous? #1243

@ricea

Description

@ricea

Consider the following code:

let synchronous;
new ReadableStream({
  pull(controller) {
    synchronous = true;
    controller.enqueue();
    synchronous = false;
  }
}).pipeTo(new WritableStream({
  write() {
    console.log(synchronous);
  }
});
  1. Is this allowed to print true?
  2. Should it be allowed to print true?
  3. Is an implementation which prints true web-compatible?

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