Re: The idle loop issue


Subject: Re: The idle loop issue
From: Patrick Lam (plam@plam.lcs.mit.edu)
Date: Thu Sep 06 2001 - 11:11:52 CDT


On Thu, 6 Sep 2001, Dom Lachowicz wrote:

> 1) Separate UT_Timer and UT_Idle classes
> 2) Shared base class/interface between UT_Timer and UT_Idle
> 3) This "just works", or else we can conditionally fallback to using timers.

Sounds good to me. I suggest the name UT_Callback for the base class. It
should be abstract. We can provide a platform-specific factory for a
ut_idle which could provide a ut_timer as a fallback.

> #ifdef USING_IDLES
> UT_Worker * checker = new UT_Idle ();
> #else // USING_TIMERS
> UT_Worker * checker = new UT_Timer (SPELLCHECK_MILLISECONDS);
> #endif

Again, this could be done at the factory method.

pat



This archive was generated by hypermail 2b25 : Thu Sep 06 2001 - 11:11:54 CDT