CLIM mail archive

[Prev][Next][Index][Thread]

A Kinder Gentler Event Loop



    Date: Fri, 15 Mar 1991 12:53 EST
    From: kab@chestnut.com (Kim Barrett)

    [kmp added as x3j13 editor.]

    > Your only other choice is to have the event loop run continuously,
    > waiting for a period of time to elapse by watching the clock, since
    > SLEEP provides granularity of one second.

    I couldn't just let something like this go by.

    The definition of SLEEP says that the argument may be any non-negative
    non-complex number (probably this should be read as non-negative REAL now).
    This permits fractions of a second to be specified.  The actual granularity is
    implementation specific.

Whatever.  My point is that SLEEP is a lousy way to implement timers
in an event loop.  What shaff@rpal.rockwell.com needs is a primitive
that blocks on a set of events (mouse motion, keyboard input, etc.), but
will also becomes runnable when a timer expires.  This primitive is
rightly provided by the operating system, not CLIM.

0,,

References:

Main Index | Thread Index