"Well, Amigo, you're one step closer to earning the title of 'junior Java developer'! You're doing well with the theory and practice. Congratulations!"
"Thank you, Professor! But you've probably prepared something interesting for me, right?"
"You guessed it! To start, I can tell you about how I built my first cosmic laser from the extremities of extinct robo-dinosaurs…"
"Maybe next time, Professor?"
"Okay, okay. Here's some home reading then."
Thread synchronization. The synchronized operator
In the initial stages of your training, threads often worked independently of one another. Now that you're familiar with multithreading, you know that different threads can simultaneously interact with and modify the same set of data. To avoid confusion, you need the synchronized operator. We've dedicated a separate extended lesson to this important topic.
Managing threads. Volatile methods and the yield() method
Another detailed lesson is devoted to the volatile keyword and the yield() method, and to rules governing happens-before relationships. You'll learn more about a variety of methods of controlling the flow of a multithreaded program.
GO TO FULL VERSION