1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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