
7 Oct
2015
7 Oct
'15
6:32 p.m.
On Wed, Oct 7, 2015 at 10:16 AM, Markus Ongyerth
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
https://hackage.haskell.org/package/base-4.8.1.0/docs/GHC-Conc.html#v:thread...
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