What happens when a thread calls the signalAll method of a Condition object connected to a lock, if no other thread had called await on that Condition object?
A) A compiler error.
B) A checked exception is thrown.
C) The unlock method call will block.
D) Nothing, the program executes normally.
Correct Answer:
Verified
Q63: Calling the wait method in synchronized code
Q64: Which are ways that a thread can
Q65: When is it a good idea to
Q66: Under what conditions are locks unnecessary for
Q67: Assume three threads share a BankAccount object
Q69: lock objects ensure that shared data are
Q70: Why does the textbook recommend signallAll over
Q71: Class MyClass has a single ReentrantLock object,
Q72: Consider an old fashioned telephone booth that
Q73: Class MyClass has two ReentrantLock objects, myLock1
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents