Added support for parser.pause() with the following semantics:
After a parser.pause(), no events should be emitted before the next parser.resume(), even if parser.write() is invoked.
Needed to slightly modify:
Added test test/pause.js that takes a large xml chunk, breaks it in pieces and:
Documented parser.pause in README.
preventing race condition while resuming
Found this problem when .end() occurs while it's paused, will have to come back, sorry.
setting resuming to false when pausing
postponing ending when stream is paused
removed commented log
preventing from cycling when resuming is interrupted
I'd like to pull this in, but it doesn't apply cleanly. would you mind rebasing onto the current master, and squash down to one or two commits?
Can we get this pull request accepted? I could really use parser.pause()
Anything happening with this? It would make my life complete.
That's a bit humorous. parser.pause() = life complete. Sorry. Had to state the obviously cheesy.
+1 for this feature !
Superseded by #107