On Mon, Apr 18, 2011 at 12:48 AM, Jason Dusek <jason.du...@gmail.com> wrote:
>  I gather I need to write the busy loop for polling for data in
>  Haskell. Although libpq has a procedure -- PGgetResult -- that
>  polls for data, it would not respond to killThread.

Please don't use a busy loop! Instead use PQSocket() to get the
underlying socket file descriptor, and call
ThreadWaitRead/ThreadWaitWrite to use the system event dispatcher
(epoll() or select()) to efficiently multiplex.

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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to