Re: Task API
Robert Craig wrote:
>
> A common situation would be that a task waits (tests then yields)
> for one or more other tasks to all terminate. I want that to have
> low overhead, so I'll probably have a routine that returns a list
> of active or suspended tasks in a 1-d sequence,
> and another low-overhead routine that returns the status of
> any one task. Maybe it would return:
> -1 the task has finished (doesn't exist)
> 0 the task is suspended
> +1 the task is active
That is an even better idea, and I can still make a task_list_all() routine:
global function task_list_all()
return {{task_list(0)} & {task_list(1)}}
end function
> By the way, something needed by Language War,
> and other games, is the ability to stop the scheduler's clock,
> and restart it later. In LW for instance, the user is allowed
> to freeze the game (to answer the phone etc.). When he resumes
> the game a few minutes later, it's not good for all
> real-time tasks to suddenly be ready to run.
Would this be another routine or two? Perhaps something like task_reset() and/or
task_stop()?
>
> Regards,
> Rob Craig
> Rapid Deployment Software
> <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>
>
Regards,
Vincent
|
Not Categorized, Please Help
|
|