The task_yield statement causes the currently executing task to give up the processor and allow another task to run.When an XCSB task is in a loop waiting for something to happen, it should yield the processor periodically otherwise other tasks will not be given a chance to run. It is acceptable for a task to keep control of the processor for as long is it needs to BUT keeping it exclusivly will have an impact on other tasks.
Sometimes it is enough to have a loop that polls an input then yields (alternating between polling and yielding) sometimes it is neccessary to poll several times per yield statement.
task_yield cannot be used by one task to force another task to give up the processor.
syntax
task_yieldsee note on task numbers