How to use the GOL / Haskell version with epoll / kqueue support for network connections?

There is a lot of old information on the web regarding eph / kqueue GHC. For example, the code on the Simple Servers wiki page no longer compiles.

Can someone provide a basic example of how to use this function with a modern version of GHC for assembly, for example? A TCP server that just answers "Hello" on the connection?

+1
haskell ghc epoll
source share
1 answer

The GHC IO manager uses epoll / kqueue under the hood without any special programmer effort. Just write a naive threaded program that puts each simultaneous blocking IO call into a separate thread - and the GHC will make sure that it works the way you want.

+2
source share

All Articles