jagdish bidwai
What is the significance of volatile keyword in Singleton design pattern?
By jagdish bidwai in .NET on Dec 16 2016
  • Rajendra Taradale
    Nov, 2017 21

    The volatile keyword indicates that a field might be modified by multiple threads that are executing at the same time. Fields that are declared volatile are not subject to compiler optimizations that assume access by a single thread. This ensures that the most up-to-date value is present in the field at all times. The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock statement to serialize access.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS