consumer « Notify « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Notify » consumer 

1. Producer/Consumer - how to notify consumer only?    coderanch.com

Hi I have seen many examples using wait/notifyAll to sync producer/consumer for a queue. Now my question is when there are many producer and consumer threads blocked on wait-list over the time, how do you wake up consumers only when the queue is not empty (theflip side of the coin is that when the queue is not full, how do you ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.