*Question 1* When I read things like "*data will be lost* if there is no listener when a Readable Stream emits a 'data' event," it's pretty obvious that I need to have a listener attached before the stream is capable of emitting events. How can I guarantee this? Said another way, what is the earliest point in one-and-only js thread and/or the event-loop when a stream can emit an event?
I am looking at this from two sides. On one side, I need to make sure I don't miss any data events. On the other side, I don't want to accidentally create blocking code by doing something which would delay the data events. *Question 2* If I create a steam indirectly, such as with fs.create ReadStream(...) who is responsible for releasing the file descriptor (or other resources)? Should I call destory() on the stream or not? Thanks! -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
