79174693

Date: 2024-11-10 10:52:17
Score: 1
Natty:
Report link

controllerThread sets the suspendRequested flag to true when it wants to pause threadA. threadA checks this flag if it's in run() method and, if it's set, it enters a waiting state using wait() or Thread.sleep(). To resume threadA, the controlling thread sets suspendRequested back to false and calls notify() to wake threadA up.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: sponge bob