Hemanth H.M wrote:
Streams allow the event loop to run between iterations, unlike yield, that's where it gets tricky and converting a stream based logic to task.js isn't straight forward.
How about something like this?
spawn(function *() {
var gen = this.thread;
stream.on('data', function (data) {
gen.send(data);
});
console.log(yield gen.next());
});
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

