filmov
tv
Java Concurrency Interview: Implement Producer Consumer pattern using wait-notify
Показать описание
Implementing Producer Consumer using BlockingQueue, Locks/Conditions and Wait-Notify.
Important: The last part about using wait-notify is incorrect. My mistake, sorry about that.
The object used to wait/notify should be the same object used by threads to synchronize (to avoid IllegalMonitorStateException). So correct code should be similar to:
synchronize(sharedQ){
sharedQ.wait();
}
synchronize(sharedQ){
sharedQ.notifyAll();
}
That was a basic mistake which I should have caught. I feel bad about misleading the initial viewers. Sorry.
Channel
----------------------------------
Master difficult programming concepts in few minutes. I try to explain difficult concepts like Java concurrency in simple to understand manner. Explore videos on topics like Spring Boot, Cloud Foundry, Java 8 and more. I am happy to clarify your doubts. Ask me anything in the comments. Also happy to take requests for new videos.
New video added every Sunday.
Current Playlists
----------------------------------
Popular Videos
----------------------------------
Important: The last part about using wait-notify is incorrect. My mistake, sorry about that.
The object used to wait/notify should be the same object used by threads to synchronize (to avoid IllegalMonitorStateException). So correct code should be similar to:
synchronize(sharedQ){
sharedQ.wait();
}
synchronize(sharedQ){
sharedQ.notifyAll();
}
That was a basic mistake which I should have caught. I feel bad about misleading the initial viewers. Sorry.
Channel
----------------------------------
Master difficult programming concepts in few minutes. I try to explain difficult concepts like Java concurrency in simple to understand manner. Explore videos on topics like Spring Boot, Cloud Foundry, Java 8 and more. I am happy to clarify your doubts. Ask me anything in the comments. Also happy to take requests for new videos.
New video added every Sunday.
Current Playlists
----------------------------------
Popular Videos
----------------------------------
Java Concurrency Interview: Implement Producer Consumer pattern using wait-notify
13.8 Multithreading InterThread Communication | Producer Consumer
Producer Consumer Pattern - With Java Example
What is BlockingQueue ? How can we implement Producer Consumer problem using BlockingQueue ?
Part 3: Multithreading InterThread Communication | Producer Consumer using wait and notify
The Producer-Consumer problem #concurrency #interview #java #multithreading #software #technology
Java Concurrency & Multithreading Complete Course in 2 Hours | Zero to Hero | Interview Question...
How can you start a Thread? - Cracking the Java Coding Interview
29. Multithreading and Concurrency in Java: Part1 | Threads, Process and their Memory Model in depth
Java8 | Multithreading | 🔥 Asked in Oracle | Print Even & Odd Numbers Using 2 Thread | JavaTec...
What is the difference between Runnable and Thread? - Cracking the Java Coding Interview
Java BlockingQueue
Top 25 Java Multi Threading Interview Questions & Answers | Ashok IT
Multithreading in Java Explained in 10 Minutes
Java Concurrency Interview Question: Multi-threaded Message Queue like Kafka, SQS, RabbitMQ
Producer Consumer Problem in Java? | Blocking Queue in java | Threads and Concurrency
java multithreading scenario based interview question || Java Concurrency Interview Question
Multi-Threading using Java🔥🔥 | Java Multithreading in one video | HINDI
Java Concurrency Interview: Implement Scatter Gather pattern
Java Concurrency Interview Question: Print N numbers via 2 threads one for each even and odd number
13.7 Multithreading Synchronized Keyword
Java Concurrency Interview Question: How to timeout a thread?
Java Concurrency Interview - What is an Ideal Threadpool size?
Why Thread behavior is unpredictable ? || Java Concurrency Interview Question
Комментарии