# L-12 MCS 507 Mon 18 Sep 2023 : prodcons.py

"""
Illustration of producer/consumer with threads.
"""

from classproducer import Producer
from classconsumer import Consumer

QUE = []     # queue is shared list
PROD = Producer("producer", QUE, 1, 3, 4)
CONS = Consumer("consumer", QUE, 3, 1)
PROD.start()  # start threads
CONS.start()
PROD.join()   # wait for thread to finish
CONS.join()
