QUEUE: Avoid data lost when Queue buffer is full
Image shows the execution of the task WriteInQueue() which sends data to the Queue Buffer. If we back to the code we can observe that now the task going to send data to
Image shows the execution of the task WriteInQueue() which sends data to the Queue Buffer. If we back to the code we can observe that now the task going to send data to
Task WriteInQueue() finishes execution and the Queue buffer is full. The image shows the execution of task ReadInQueue() , all the buffer must be read and print only the messages received. The letter āiā
Timeline shows that the task1 executes first, sending the first message to the Queue, and after the receiver task executes reading the message. After the receiver task reads the first message, the next
Exactly like the previous example, Task1 and Task2 init sending messages to the queue, when the receiver task executes the first message read is the message from Task1. Next, Task1 sends the message
Observe that at the init, Task sender 1 and Task sender 2 ( Task1 and Task2 ) were executed, Task1 sent a message to Queue, and after Task2 sent another message. After, receiver task executes,