@synchronized

Discussion in 'Mac Programming' started by davbeck, Oct 28, 2009.

  1. macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #1
    I am a little curious about @synchronized. If I understand it correctly, @synchronized(object) will block the statement for that object only. So if another thread comes along and tries to execute that section of code with a different object, it will go right ahead and do it, but if another thread comes along and tries to execute the code with the same object, it will be blocked.
     

Share This Page