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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Nov 9 21:03:22 EST 2009

Although I previously suggested a low-priority event callback,
`system-idle-evt' seems even better. The `system-idle-evt' function
didn't exist when we implemented syntax coloring as a background task.

Using `system-idle-event' stays out of the way of other GUI events in
the same way as a low-priority callback, and since `system-idle-evt' is
fair (or is supposed to be), multiple background tasks should work
fine, allowing each a turn when no other work is available.

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.

At Mon, 9 Nov 2009 19:48:16 -0600, Robby Findler wrote:
> I would guess it would be a better fit for GUI interactivity. Use a
> low priority callback to trigger each quantum of work.
> Robby
> On Monday, November 9, 2009, Eli Barzilay <eli at barzilay.org> wrote:
> > On Nov  9, Robby Findler wrote:
> >> Thanks, Eli. That looks nice.
> >>
> >> Matthew suggested something similar, but using mzlib/couroutine,
> >> where I use a low-priority gui callback to give the thread the next
> >> quantum.
> >
> > Is there any advantage for that?
> >
> >
> > On Nov  9, Robby Findler wrote:
> >> PS: feel free to check this in, but it probably belongs in
> >> scribble/xref or setup/xref, not in the syntax checker.
> >
> > I'll probably put it in `scheme/promise' as some `delay/idle', so it
> > works with `force' as usual.
> >
> > (There is some concern if there are several of these things active --
> > if both use the same delay values, then one can starve the other.  But
> > I don't think that this is a problem since it's used only for idle
> > computations.)
> >
> > --
> >           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
> >                     http://barzilay.org/                   Maze is Life!
> >
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-dev

Posted on the dev mailing list.