[gambit-list] Pushing events between C++ and Scheme + timers
Joel Reymont
joelr at well.com
Wed Dec 8 15:53:13 EST 2004
> Marc Feeley wrote:
>That is a problem because the timers will only expire on time if C
>returns control to Scheme in a timely manner. Polling should be
>avoided...
So if I don't need exact timers and make it a point of calling some
Scheme function on every iteration of my C++ main loop (every second or
so) then I should be ok, right?
And this would not be an issue if I just start a thread on the C++ side
and then call a Scheme function that never returns (Scheme main loop), right?
>So the C side should call a Scheme function to add an event to
>the FIFO (on the output port side), and this will unblock the
>Scheme thread that is blocked on a read on the input port side
>of the FIFO.
Just for posterity and the google archives, there's another excellent
example of how to do this on page 122 of the Gambit manual.
Thanks a lot for your help!
Thanks, Joel
--
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums
More information about the Gambit-list
mailing list