Reputation: 1105
I have a situation where I'm going to need to stream for example 100 files concurrently, but I don't know weather I need subprocess or not because i'm not sure if have one really large file will block the other ones from streaming. Can anyone help clear up what should be done in this situation. Am I going to need to spawn a subprocess? Or can i just stream them all at the same time in a single process?
Upvotes: 0
Views: 294
Reputation: 18956
Node is async, read file or send data will not block your process, so you do not need to spawn a sub process.
Make sure that your app do not call any sync functions such as fs.readFileSync fs.readdirSync, etc.
Upvotes: 1