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.

Pause doesn't affect write #23

@azer

Description

@azer

In a case, I need to pause streaming until another part of the program is ready. I call the pause function, but through keeps calling the write function, which needs to wait until I call resume.

For example:

    var paused = true
    var ts = through(function () {
         console.log('paused?', paused)
     }).pause()

     fs.createReadStream('foobar').pipe(ts)

     setTimeout(function () {
         paused = false
         ts.resume()
     }, 1000)

Will output:

paused? true

Is it the intended behavior?

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