![]() ZBasic System Library
175
ZBasic Microcontrollers
Type
Subroutine
Invocation
LockTask()
Discussion
This routine causes the running task to become locked so that no other task can run. The one exception
to this is a task that is awaiting an external interrupt or an interval interrupt. Note that a task may explicitly
unlock itself by calling UnlockTask(). A task will also become unlocked if it calls any of the sleep or
delay routines.
Note that multiple calls to LockTask() have the same effect as a single call to LockTask() assuming
that no other calls are made that implicitly unlock the task.
Compatibility
The BasicX documentation indicates that a locked task will yield to a task that is awaiting an interrupt
when the interrupt occurs. However, testing indicates that this is, in fact, not the case. This
implementation allows an interrupt task to have priority over a locked task.
See Also
|