2008/7/23 Levi Greenspan <[EMAIL PROTECTED]>:
> I would be grateful for any advices, hints or comments. And I really
> look forward to the FFI section in the "Real World Haskell" book.

Generally it looks pretty good. I think I'm missing some C code
(function "wrapper"). However, libevent is an odd choice to wrap. The
RTS already multiplexes IO for Haskell programs. In order not to block
the RTS, the libevent using code would have to be in its own kernel
thread.

Really, the RTS needs to be ported to libevent rather than an FFI wrapping.

For your specific problem, I see you're allocating xptr, but I don't
see that you're ever poking a value into it. Indeed, I can't see that
createEvent ever uses 'x'.

Hope that helps.




AGL

-- 
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to