Closed evnm closed 10 years ago
Ah, I see. Thought that it was simply aggregating multiple calls to read
, but now I see what buf = buf.slice(len, buf.length)
is doing. I think the simpler option of just using synchronized
is preferable, rather than introducing even more complexity with a queue.
I think you'll want to accumulate a result in
read
rather than use a sharedbuf
var.