Why does the textbook recommend signallAll over the signal method?
A) The signalAll method is always more efficient
B) signal can lead to deadlocks when not every waiting thread is able to proceed
C) signalAll notifies the waiting threads that sufficient funds is absolutely available, while signal only notifies one at a time
D) None of the above
Correct Answer:
Verified
Q65: When is it a good idea to
Q66: Under what conditions are locks unnecessary for
Q67: Assume three threads share a BankAccount object
Q68: What happens when a thread calls the
Q69: lock objects ensure that shared data are
Q71: Class MyClass has a single ReentrantLock object,
Q72: Consider an old fashioned telephone booth that
Q73: Class MyClass has two ReentrantLock objects, myLock1
Q74: Assume two threads share a BankAccount object
Q75: Assume three threads share a BankAccount object
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