T
T
tamtakoe2015-01-07 16:22:07
Node.js
tamtakoe, 2015-01-07 16:22:07

When is flush called on a thread in node.js?

As you know, a callback for flush can be passed to the node.js thread . I noticed that flush is not always called. For example, if using transform to remove all data from the stream, then it is called, otherwise it is not. It's all kind of hazy. Can someone explain how it works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fedor Indutny, 2015-01-28
@donnerjack13589

this._flush()called during 'prefinish' event: https://github.com/iojs/io.js/blob/40ffed8f3f4392d...
'prefinish' called during stream.end(): https://github.com/iojs/io.js/blob /40ffed8f3f4392d...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question