CodeGym /Courses /Java Multithreading /Practice with "wait-notify-notifyAll"

Practice with "wait-notify-notifyAll"

Java Multithreading
Level 7 , Lesson 9
Available
Practice with

"Hi, Amigo!"

16
Task
Java Multithreading, level 7, lesson 9
Locked
Producer–consumer
In the TransferObject class, arrange calls to the wait/notify/notifyAll methods to ensure the sequential production and consumption of objects. In the run methods of the ConsumerTask and ProducerTask classes, create the necessary synchronized blocks.
16
Task
Java Multithreading, level 7, lesson 9
Locked
Arrange wait and notify methods
Arrange wait and notify methods. Example output: Thread-0 MailServer received: [Person [Thread-1] wrote an email 'AAA'] in 1001 ms.
16
Task
Java Multithreading, level 7, lesson 9
Locked
CountDownLatch
You are given a standard implementation of the wait-notify pattern. Read about CountDownLatch and use the latch field to rewrite the body of the someMethod method. Remove all unnecessary code from the class.
Comments (1)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Seb Level 41, Crefeld, Germany
30 January 2020
A hint for the task "Arrange wait and notify methods" - the validator might tell you to make sure that a class should work in a multithreaded environment. The issue then may not necessarily be in the mentioned class itself...