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