[Haskell-cafe] Poisx select support

Galchin Vasili vigalchin at gmail.com
Wed Jan 16 15:09:31 EST 2008


Hi Don,

     Sorry ..I  wasn't clear enough.I am trying to determine from the
Haskell FFI doc what datatype to use in order to model C's "void *", e.g.
for mmap http://www.opengroup.org/onlinepubs/000095399/functions/mmap.html

Regards, Vasili



On 1/16/08, Don Stewart <dons at galois.com> wrote:
>
> vigalchin:
> >    Hello,
> >
> >           In the ghc libraries directory I can't find the Haskell
> >    .hs/.lhsthat implements Posix select. ?? I found Select.c.
>
> In Control.Concurrent
>
>    forkIO
>    threadDelay
>    threadWaitRead
>    threadWaitWrite
>
> The thread primitives are implemented in terms of select, and give you a
> cleaner interface.
>
> Also, with Control.Concurrent.STM.
>
>    atomically
>    orElse
>    retry
>
> You can have threads wait on one of a series of alternative events.
> Using STM, you'll be able to compose blocks of such code, which you
> can't do with select.
>
> -- Don
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080116/ed81c74d/attachment.htm


More information about the Haskell-Cafe mailing list