On Wed, Oct 7, 2015 at 10:16 AM, Markus Ongyerth <ongy44@gmail.com> wrote:
Mostly because i am used to the poll/select method I mentioned and that
one works without any threading.
I don't really mind using the threaded runtime though, it's more habit.

The stock stuff in the threaded runtime uses epoll() out of the box. When you call hRead on a Handle, if the handle would block then you ultimately get a call to threadWaitRead or threadWaitWrite; these functions register interest in the given file descriptor, and the IO manager / GHC runtime scheduler will wake up your thread (GHC uses "green" threads) when the file descriptor becomes writable.

G
--
Gregory Collins <greg@gregorycollins.net>