Yes, I'm aware of taskjs.

So it's not a good idea to mix streams and generators!

Thanks :)


On Sun, Dec 8, 2013 at 10:41 AM, Brendan Eich <[email protected]> wrote:

> Hemanth H.M wrote:
>
>> Yes, that's where I'm stuck.
>>
>> Here are the few variations I tired :
>>
>> ```
>> function* FileReader(){
>>     // Some stream code on node;
>>     stream.on('data',yield function*(data) {
>>           yield data;
>>     });
>> }
>>
>
> Please notice that stream.on, or any event emitter.on in Node.js, will set
> an event listener callback to be called later, the generator function
> activation in which you call stream.on will have returned already. You want
> to use something like task.js here. See http://taskjs.org/.
>
> /be
>
>
>


-- 
*'I am what I am because of who we all are'*
h3manth.com <http://www.h3manth.com>
*-- Hemanth HM *
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to