I’m coming from VB6 and I’m new to Java. In VB6, DoEvents gives up the processor and allows it to process other threads. Is there a similar thing in Java? How do I use it?
I’m coming from VB6 and I’m new to Java. In VB6, DoEvents gives up
Share
Thread#yield() is the java counterpart to relinquish the control of the processors voluntarily.
From the javadoc for java.lang.Thread#yield():
Note:
In case of Java based desktop UI frameworks like Swing, RIM’s UI application, there are ways to modify the UI using
invokeLater()type of semantics.