/ __ \/ ____/ | / __ \/ |/ / ____/ / |/ / __ \
/ /_/ / __/ / /| | / / / / /|_/ / __/ / /|_/ / / / /
/ _, _/ /___/ ___ |/ /_/ / / / / /____ _ / / / / /_/ /
/_/ |_/_____/_/ |_/_____/_/ /_/_____ / (_) /_/ /_/_____/
This project contains multiple implementations of the classic Producer-Consumer problem in Java. Each version demonstrates different approaches to solving this concurrency challenge.
src/prodcons/v1: Initial version with basic implementation.src/prodcons/v2-v6: Iterative improvements and variations of the producer-consumer implementation.resources/options.xml: Configuration file for customizable options.
- Java Development Kit (JDK) 11 or higher.
- A Java IDE or build tool (e.g., Eclipse, IntelliJ IDEA, or Maven).
- Clone or download the project to your local machine.
- Open the project in your preferred IDE.
- Navigate to a
TestProdCons.javafile in one of the versions (e.g.,src/prodcons/v1/TestProdCons.java). - Run the file to execute the producer-consumer logic for the selected version.
You can customize runtime parameters via the options.xml file located in src/resources.
Feel free to submit issues or pull requests if you have improvements or fixes!