13- The volatile Keyword

6:33 2 સ્પીકર 2 પ્રકરણો 175 સેગમેન્ટ્સ

પ્રકરણો

  1. 0:03

    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…

  2. 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…