mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-09 20:22:06 +00:00
docs: update producer-consumer
This commit is contained in:
@@ -181,10 +181,6 @@ Program output:
|
|||||||
08:10:17.483 [pool-1-thread-5] INFO com.iluwatar.producer.consumer.Consumer -- Consumer [Consumer_2] consume item [10] produced by [Producer_1]
|
08:10:17.483 [pool-1-thread-5] INFO com.iluwatar.producer.consumer.Consumer -- Consumer [Consumer_2] consume item [10] produced by [Producer_1]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Detailed Explanation of Producer-Consumer Pattern with Real-World Examples
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## When to Use the Producer-Consumer Pattern in Java
|
## When to Use the Producer-Consumer Pattern in Java
|
||||||
|
|
||||||
* When you need to manage a buffer or queue where producers add data and consumers take data, often in a multithreaded environment.
|
* When you need to manage a buffer or queue where producers add data and consumers take data, often in a multithreaded environment.
|
||||||
|
|||||||
Reference in New Issue
Block a user