Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Use concurrency limit to prevent EMFILE errors #10

Open
stuartpb opened this issue Jan 24, 2013 · 2 comments
Open

Use concurrency limit to prevent EMFILE errors #10

stuartpb opened this issue Jan 24, 2013 · 2 comments

Comments

@stuartpb
Copy link

Something like

var queue = require("queue-async")
var q = queue(opts.concurrency || 250)
// ... for each file ...
q.defer(replace)
//before terminating
q.awaitAll()
@stuartpb
Copy link
Author

Of interest: https://github.com/isaacs/node-graceful-fs

@harthur
Copy link
Owner

harthur commented Jan 26, 2013

Thanks. Interestingly, I tried graceful, and it was slower than synchronous on most code bases I tried. I just kind of accepted it and didn't dig into it too hard.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants