As javascript is single threaded you usually don't need callback unless
it's IO related. However, there are exceptions:
(i) Heavy calculations might want to utilize process.nextTick() or
timeout, to avoid blocking. You would have to use a callback to return
the final results
(ii)
As javascript is single threaded you usually don't need callback unless
it's IO related. However, there are exceptions:
(i) Heavy calculations might want to utilize process.nextTick() or
timeout, to avoid blocking. You would have to use a callback to return
the final results
(ii)
for more information.
On Monday, April 8, 2013 6:51:54 PM UTC-4, Floby wrote:
It's funny because I have made a joiner stream here at
http://github.com/Floby/node-stream-stream
On Monday, 8 April 2013 03:00:28 UTC+2, Sigurgeir Jonsson wrote:
When piping multiple streams into one stream
When piping multiple streams into one stream (terminal stream) an end-event
from any of the inputs seems to immediately result in a finish event of
the terminal stream.
Would it not make sense to keep count of incoming pipes that have been
defined, and only emit finish when ALL incoming streams
Would it make sense to amend stream.Writable so that highWaterMark stands
for the maximum number of write-operations (callbacks) outstanding at each
point?
Currently, it seems that stream.Writable is stuck in sequential mode, i.e.
only one write operation can be outstanding at any given point,
not be shoehorned
into the Stream shape, imo.
On Thu, Apr 4, 2013 at 10:24 AM, Sigurgeir Jonsson
ziggy.jo...@gmail.com javascript: wrote:
Would it make sense to amend stream.Writable so that highWaterMark
stands
for the maximum number of write-operations (callbacks) outstanding
well. If you were
writing a library for a special parser, you might write a custom Writable
stream and inside it you would be using the read(n) api to control *how*
you read data off the socket. I hope that makes sense.
:Marco
On Monday, March 18, 2013 11:06:48 AM UTC-7, Sigurgeir Jonsson