Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running out of file descriptors #11

Open
harendra-kumar opened this issue Mar 31, 2016 · 2 comments
Open

Running out of file descriptors #11

harendra-kumar opened this issue Mar 31, 2016 · 2 comments

Comments

@harendra-kumar
Copy link

Is it possible to avoid using a pipe for communicating between C to Haskell? A pipe uses 2 fds. It will be much more scalable if we can do away with those fds.

Haskell stack runs out of fds on OSX while using filewatch via fsnotify. Please see commercialhaskell/stack#1979 .

@luite
Copy link
Owner

luite commented Apr 1, 2016

hmm, perhaps I can change it to use a single pipe for all watches. if many watches are created, having an thread for each of them would probably also be less than ideal.

@harendra-kumar
Copy link
Author

Haskell threads should be relatively cheap but pthreads on the C side might not scale well. Can we make watchCallback a Haskell function and use the C wrapper of the Haskell function in the C code? GHC supports that. That way we can avoid the pipes as well as pthreads, making the library scalable irrespective of how the application designers use it.

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

No branches or pull requests

2 participants