LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer/Consumer vs Master/Slave

In comparing the Producer/Consumer design pattern template to the Master/Slave, it appers to me the only difference between the two is one uses Notifiers and the other uses a Q.
 
What are the pros and cons of this difference?  Under what conditions would you choose one over the other?
 
Thanks,
Bill F
0 Kudos
Message 1 of 3
(6,073 Views)
Queues can buffer data while notifiers cannot is one difference.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 3
(6,067 Views)

To add to Analog Kid's answer,an extract from defination of producer consumer pattern

The Producer/Consumer design pattern is based on the Master/Slave pattern, and is geared towards enhanced data sharing between multiple loops running at different rates.As with the standard Master/Slave design pattern, the Producer/Consumer pattern is used to decouple processes that produce and consume data at different rates. The Producer/Consumer pattern’s parallel loops are broken down into two categories; those that produce data, and those that consume the data produced. Data queues (which are covered more in-depth in the Queued Message Handler section) are used to communicate data between loops in the Producer/Consumer design pattern. These queues offer the advantage of data buffering between producer and consumer loops.

Regards

Dev

Message 3 of 3
(6,058 Views)