Cold Help System: Programming: ColdC Reference Manual: Implementation: Tasks and Frames: Preempting


When a task is preempted it stops executing and is queued behind other current tasks. When these tasks are finished executing the preempted task continues, with a refreshed tick amount. Preempting can be caused by calling either pause() or refresh(). pause() will always preempt immediately. refresh() will only preempt if the tick count is nearly exhausted. Furthermore, if executing atomically refresh() will not preempt, but will immediately refresh the tick count and continue executing.

Tasks may also be suspended indefinitely by using the function suspend(). The function resume() will resume a suspended task. The function cancel() will cancel a suspended task.

For more information see A Preempting Example.


Frames | Tasks | Preempting


the Cold Dark