Are the notify() and wait() methods implemented correctly? I was expecting the output to be from 0 to 10 with no double nor numbers missing, but i am actually get doubles AND number missing... [ July 07, 2005: Message edited by: Barry Gaunt ]
I have just started reading on java threads and i have a question on the code you wrote.Don't we use wait() method to wait for some condition to be met.I don't see any such condition here.For e.g. in getValue() method, is it not required to check if the value is updated and wait until the updating is done.
It was the best of times. It was the worst of times. It was a tiny ad.
Gift giving made easy with the permaculture playing cards