Does a thread gives up monitor lock when Thread.sleep() is called?
From the Javadocs:
Causes the currently executing thread to sleep (cease execution) for the specified number of milliseconds plus the specified number of nanoseconds. The thread does not lose ownership of any monitors.
Edited 6 Years Ago
by ~s.o.s~: n/a
No. However, Thread.wait() does, until it is notified, at which point it regains the monitor if it is the chosen thread that is woken up.
I'm coding a program to learn OpenGL in C++ (based off of The Benny Boxes tutorials) and I've run into a snag where I don't get any errors, but my ...
I want to implement undo logic which deletes the last drawn shape. To test this logic i had cleared shapes list and redrawn all shapes but still last ...
Please tell me why triangle shape is redrawing on mouse move. It want triangle shape draw only once until mouse release.
Here is my code below. Thank you ...