63 043
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #29048 in Java | JSP | JSF for Phil

Question #29048
How can I simulate busy waiting in Java threads without using suspend();, wait(); notify(), and notifyAll()?
Expert's answer
You can do it in this way:
thread1:

while(!sharedBoolean) {
//busy wait
}

thread2:

sharedBoolean = true;//will wake up thread1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions