Skip to main content

All Questions

Filter by
Sorted by
Tagged with
109 votes
2 answers
9k views

Questions about thread+loop not working without print statement

Consider the following scenario in Java: A developer has written a loop that waits for some state to be changed from a different thread. The loop doesn't seem to see the change. The developer adds a ...