[plt-dev] Re: [plt-scheme] Speed up check-syntax

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Nov 9 21:16:53 EST 2009

On Nov  9, Matthew Flatt wrote:
> Low-priority callbacks, meanwhile, effectively have a higher
> priority than threads blocked on `system-idle-evt'. So, maybe it's
> good that syntax coloring uses callbacks, since that will give it a
> higher priority than loading cross-reference information.

That's what I was fantasizing on previously -- in terms of that
message, low priority callbacks and idle events make two levels.  (And
yes, the idle event as an "I really don't care when it runs, just move
it out of the way" is something that fits the xref loading well, but
not the colorer.)

BTW, one thing that I don't like about my code is that it first
sleeps, then waits for an idle event.  My first thought was that it
should wait for the system to be idle for some time before it kicks
in.  It's not possible to do this now, right?  (Modulo some ridiculous
busy-wait loop that keeps polling the event.)  Is it possible to add
something that will make it possible?

(In theory there's not much point in doing this if the time slices
that I'm using are smaller than what matters for human interaction,
but when resources like IO are involved, it might make things feel a
little less responsive.)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.