Skip to content
Advertisement

Tag: notify

Java Thread is blocked in join()

I have the following simple code in which I put and take from a Queue represented as an ArrayList. I don’t understand why my thread is blocked in join() method. From main I call as follow: Answer Without running it… The close() method holds lock at the time it calls thread.join() and waits on thread (forever) thread is waiting to

Java Delay/Wait

How do I delay a while loop to 1 second intervals without slowing down the entire code / computer it’s running on to the one second delay (just the one little loop). Answer

Advertisement