> If the whole timer (all tasks) runs on a single thread, then how are
> multiple tasks scheduled successfully? For example, suppose a timer
> has two tasks, one runs every 5 sec and one every 1 sec. If the first
> task takes 3 sec to run, and the second task takes 0.5 seconds, then
> to run them all requires 6 sec, which is more time than you have.
In that case, it's better to make 2 timers. It can also be users'
responsibility to choose period properly, I think. The case I was
considering was that a timer would have 100 tasks and they can be
done in 1ms or so such as expiring server session. In this case,
creating a thread per task is too much.
> So unless I misunderstand completely, each task must run in a separate
> thread.
Implementations may choose like this but the SRFI doesn't specify how
the tasks are executed.
_/_/
Takashi Kato
E-mail: xxxxxx@ymail.com