On 28-Dec-05, at 1:50 PM, Bradley Lucier wrote:
Marc:
Is there any way to add POLLs to C code? There's a C library I'd like to link to a program, but one C routine could possibly take seconds or minutes to run, and Gambit disables interrupts except through POLLs.
I see two solutions.
1) if you can modify your C library, add the test "___ps->intr_flag [___INTR_USER] != 0" at appropriate places in the C library to detect when a CTRL-C interrupt is pending, and abort that computation,
2) execute your C library in a separate C thread, and synchronize with that thread.
Marc