How is the GHC runtime related to file inputs?

Some GHC internal environment documents mention that it uses epoll / kqueue / poll to determine if the file descriptor is ready to be read / written.

I can understand how this is done for input / output socket. But what about accessing the file on disk? Polling script does not work with regular files, only with input / output socket; true?

The only option I can imagine is to use a thread pool to block system calls, one thread for the request ...

+7
c haskell ghc
source share
1 answer

Untreaded RTS will block the entire runtime. In streaming RTS, it will make secure external calls like this through a thread pool, so features will not be blocked.

+3
source share

All Articles