Answer to Question #29048 in Java | JSP | JSF for Phil
How can I simulate busy waiting in Java threads without using suspend();, wait(); notify(), and notifyAll()?
1
2013-04-24T08:54:11-0400
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!
Learn more about our help with Assignments:
JavaJSPJSF
Comments
Leave a comment