Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

Pausing internally gets overridden by downstream streams #11

@ForbesLindesay

Description

@ForbesLindesay

e.g.

source.pipe(through(function (chunk) {
  var self = this;
  console.log('start');
  self.pause();
  setTimeout(function () {
    console.log('end');
    self.resume();
  }, 1000);
})
.pipe(process.stdout);

if you stream chunks from source, will print:

start
start
start
start
end
end
end
end

because the resumes from the process.stdout stream break the pauses within the through stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions