# L-30 MCS 275 Mon 29 Mar 2010 : prodcons.py # Illustration of producer/consumer with threads. from classproducer import * from classconsumer import * q = [] # queue is shared list p = Producer("producer",q,1,3,4) c = Consumer("consumer",q,3,1) p.start() # start threads c.start() p.join() # wait for thread to finish c.join()