Algorithm of lock (obj) { ...} statement in C#

Discussion in 'C#' started by Hyun-jik-Bae, Sep 29, 2006.

  1. Hyun-jik-Bae

    Hyun-jik-Bae New Member

    Joined:
    Sep 29, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    What is the algorithm of lock(obj) { ... }?

    The statement above roughly makes me guess that the lock/unlock algorithm in CLR is inefficient because it adds a critical section for each CLR object
    instance.

    Am I right? Please reply. Thanks in advance.

    Hyun-jik Bae
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice