ZBasic System Library
PeekQueue(queue, var, count)
array of Byte
The queue from which to retrieve data.
The variable to receive the retrieved data.
The number of bytes to retrieve.
This routine will copy the specified number of bytes from the queue to the indicated variable but it does
not remove them from the queue. The routine will not return until it can copy the entire number of bytes
specified. Because of this, you should usually check the number of bytes available in the queue using
GetQueueCount() before calling PeekQueue().
Note that if the calling task is locked and the queue contains insufficient data when this routine is called,
the task will be unlocked to allow other tasks to run.
If the requested number of bytes is larger than the queue capacity, the routine will never return. Likewise,
if not enough data is placed in the queue, the routine will never return. Also, if the variable to receive the
data is smaller than the number of bytes indicated, adjacent memory will be overwritten, usually with
BasicX allows any type for the first parameter. The ZBasic implementation requires that it be an array of