/* [From our public header files: just hand us a pointer!]
* Under WinNT/9x this defaults to gcMSWinIdleTest; otherwise
* it starts null and must be aimed by the user. Only used by
* gcAttemptCollection and gcEnablePseudoIncremental. */
GC_API_VAR gcIdleTestFunction gcIdleTest;
...
/* Some sample idle test functions */
GC_API_FUN_DEF(int) gcXIdleTest(void)
{
return !XEventsQueued( display, QueuedAfterFlush );
}
GC_API_FUN_DEF(int) gcMSWinIdleTest(void)
{
MSG msg;
return !PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
}
Example 1: An idle test function.
Back to Article