select-0.1: Give the select(2) POSIX function a simple STM interface

Safe HaskellSafe-Infered

System.Posix.IO.Select

Description

Interface to the select(2) POSIX function.

Synopsis

Documentation

select :: [Fd] -> [Fd] -> [Fd] -> Timeout -> IO CIntSource

select readFds writeFds exceptFds timeout calls the select(2) function with the file descriptors in readFds as the FD set to watch for read readiness, and similarly for writeFds and exceptFds, with timeout specifying the timeout. The return value is that of the call.

data Timeout Source

A timeout of Never tells select(2) to never time out, while Time s us sets the timeout parameters to s seconds and us microseconds.