13- The volatile Keyword
6:33
2 ஒலிப்பேழைகள்
2 அத்தியாயங்கள்
175 துண்டுகள்
ஒலிப்பேழைகள்
அத்தியாயங்கள்
-
0:03அத்தியாயம் 1: In Java, we have another tool for writing thread -safe code, but without the overhead of synchronization. 301s · Speaker 2
In Java, we have another tool for writing thread -safe code, but without the overhead of synchronization. It's the volatile keyword. It solves the visibility problem, but not the race condition. So it doesn't prevent two threads simultaneou…
-
5:05
Now, we have two threads running by two different CPU cores. Each CPU has a cache, which is a small amount of memory available locally in that CPU. Reading the data from the cache is faster because the data is closer to the CPU. So it doesn…