chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] thread scheduling: how about an idle-thread-hook?


From: tonyg
Subject: [Chicken-users] thread scheduling: how about an idle-thread-hook?
Date: Fri, 9 Aug 2002 15:49:52 +0100
User-agent: Mutt/1.2.5i

Over the past couple of days, I've implemented a select() thread which
blocks other threads that are waiting on socket I/O. (multiplex.scm
from chickenlib.)

At one stage, it occurred to me that having some way of telling the
system what to do when it is "idle" (no runnable threads? something
else?) would be nice, but I can't remember the situation in which I
thought it'd be valuable.

Essentially I think, to save spinning, I wanted to install an
idle-hook that called select() to deal with timeouts etc. In the end I
implemented a separate thread that called select() and woke up
periodically, so it was still spinning, just slower :-)

Has anyone else thought about thread scheduling and I/O multiplexing
in chicken? Any suggestions, or approaches that have worked well for
others?

Tony
-- 
Monkeys high on math -- some of the best comedy on earth
        - Tom Lord, regarding comp.lang.scheme



reply via email to

[Prev in Thread] Current Thread [Next in Thread]