Project in Java Skill Tree

Concurrent Producer-Consumer with Guava Monitor

In this project, you will learn how to implement thread communication using Google Guava's Monitor class. The project demonstrates a classic producer-consumer problem, where multiple producer threads add data to a shared buffer, and multiple consumer threads consume data from the buffer.

Java

Syllabus

★★ Challenge Mode: for Advanced Users

Introduction

Introduction

In this challenge, we will use Google Guava to implement thread communication. Google Guava provides comprehensive solutions for common technologies such as high-concurrency, functional programming, collections, caching, events, and strings. In this challenge, we will focus on using Google Guava to implement thread communication (wait() / notify() / notifyAll() or Semaphore) combined with lock technology (synchronize, Lock) to solve "producer-consumer" problems. By completing the code and consulting the Google Guava API documentation, you will test your ability to understand and use the API effectively.

Teacher

labby
Labby
Labby is the LabEx teacher.