Re: Last call cowan@xxxxxx 22 Apr 2015 19:27 UTC

Takashi Kato scripsit:

> The period can also be bigger amount such as hour. So I think it's
> more intuitive if we can specify its unit.

Fair enough.

> This is a good idea if the SRFI can specify the cost of timer creation
> really cheap. However if a timer creates a thread like reference
> implementation, then the cost of thread creation might be expensive.

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.

So unless I misunderstand completely, each task must run in a separate
thread.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Man has no body distinct from his soul, for that called body is a portion
of the soul discerned by the five senses, the chief inlets of the soul
in this age.  --William Blake