This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
Queues implemented in a Producer/Consumer architecture are most commonly used to avoid data starvation or data overflow. Using a Producer/Consumer architecture provides a synchronization advantage because the Consumer loop only executes when there is data available in the queue.Another alternative is to use Semaphores or Functional Global Variables which effectively lock the variable resource while you write to it.
Using two or more parallel loops to write to and read from the same variable or trying to access a Network Shared Variable while a value is being written to it, can cause a race condition in the following scenarios:
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.