Search code examples
haskellconcurrencyepollkqueue

Haskell concurrency over kqueue


I wrote concurrent application and have caught the error:

buildFdSets: file descriptor out of range

I found out that it is the OS limit on the number of file descriptors in one process, in my FreeBSD it is 1024. It is the limit of select(). Also I have learned that there is another approach: kqueue().

My questions are:

  • How to win limit on file descriptors?
  • How to use kqueue() instead of select() in haskell programs?

Solution

  • I believe that GHC 7 now has support for using kqueue() in it's back end:

    link to paper, descriptive blog post

    However the Haskell Platform is not yet out for GHC 7.