• Top Posts

    What is the use of volatile keyword


    • 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.
    The volatile keyword can be applied to fields of these types:
    • Reference types.
    • Pointer types (in an unsafe context). Note that although the pointer itself can be volatile, the object that it points to cannot. In other words, you cannot declare a “pointer to volatile.”
    • Integral types such as sbyte, byte, short, ushort, int, uint, char, float, and bool.
    • An enum type with an integral base type.
    • Generic type parameters known to be reference types.
    • IntPtr and UIntPtr.

    9 comments:

    1. It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge.

      ReplyDelete
    2. He operates tough is, in fact, truthful, expert along with friendly. https://www.themissionsuite.com/2016/02/what-is-inbound-marketing/ Search engine optimization agency aids me industry my company and it has helped this generate! I would personally recommend him and may even preserve trying to him regarding seo help. Many thanks, Seo Company inside!

      ReplyDelete
    3. The blog is unique that’s providing the nice material. Please post more interesting articles here.
      listleveragereview.net

      ReplyDelete
    4. Flexible and committed, the team responded well to fluctuating design ideas and the UX agencies innovative approach made for a fruitful partnership.

      ReplyDelete
    5. Your contents are too straightforward to browse and easy to understand.

      ReplyDelete
    6. The quality of your blogs and conjointly the articles and price appreciating.
      click to read more

      ReplyDelete
    7. I'd be trampled if all sites gave articles like these awesome articles.
      web design firm

      ReplyDelete
    8. They excelled at explaining technical concepts best web design websites clearly and integrating feedback quickly

      ReplyDelete

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728